[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-dev] Finding how global hash value is computed.



Sameeran, I'm afraid we're approaching the point where you're going to have to just read the code and figure this stuff out yourself. It's all right there.

John


On 07/18/2018 09:23 AM, sameeran joshi wrote:
hi,
while exploring the code base of Randprog,I am failing to find a way on how calculations of the checksum of global variables is done to check the correctness of program.
I think this part of RandomProgramGenerator.cpp does the job.

  if (CGOptions::compute_hash()) {
                 HashGlobalVariables(out);
         }
which further calls ,
  MapVariableList(GlobalList, out, HashVariable);
and above function traverses the GlobalList and assigns the values to the globalvariables.

Where does this globalvariables come from?

Could someone please tweak the further way in understanding the logic and functions and files which do the job of computing the global hashvalue.
Thanks,
Sameeran Joshi.