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

Re: [csmith-dev] wishlist: option to disable globals



Awesome, thanks Yang!

It's too bad about the checksum, though I imagine Jamey can keep busy for a little while just trying to crash his tool. If we wanted to solve this for real, we could feed function return values into the checksum, though I suspect that in a large fraction of random programs this wouldn't capture interesting computations.

John


On 5/31/16 1:28 AM, Yang Chen wrote:
Hi Jamey,

On 05/29/2016 11:40 PM, Jamey Sharp wrote:
Hi! John Regehr said I should bring this up here: I'd like to have a
csmith option to not generate or use global variables, or at least to
generate only read-only globals. Any chance someone feels like
implementing that?



I just committed some code that allows the generator to not generate
global variables if --no-global-variables is passed. See if it works for
you. Note that with --no-global-variables, all the generated programs
will produce the same checksum 0, because we compute checksums using
global variables.

- Yang