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

Re: [csmith-dev] Using safe math headers in csmith

Hi Karine, ok, I looked into this. Both of these alternative header files appear to work just fine. If you want to use the NOTMP versions, you need to pass Csmith the additional --math-notmp flag.

I ran this shell script a few times and both versions always produced the same checksum:

./src/csmith > foo.c
clang -O0 -w foo.c -I../runtime -o foo1
clang -O0 foo.c -I../runtime -DUSE_MATH_MACROS -w -o foo2
ulimit -t 2

Let us know if anything doesn't work as advertised.


On 2/24/20 8:20 AM, John Regehr wrote:
Hi Karine,

Well, I just tried to compile a program using -DUSE_MATH_MACROS_NOTMP and it did not compile, so something must have gone wrong here. I assume the same thing happened when you tried this?

I'll try to look into it soon.


On 2/24/20 2:28 AM, Even Mendoza, Karine wrote:

I would like to know if the version of csmith using the header safe_math_macros.h or safe_math_macros_notmp.c is working.

Can I use these headers instead of safe_math.h and expect the same output for the generated programs?

Thanks much,