The declaration of crc_temp inside task generateCRC1 is illegal for the very reason you are seeing incorrect results.
crc_temp
generateCRC1