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

[csmith-dev] Fwd: Building and testing with csmith





---------- Forwarded message ---------
From: sameeran joshi <gsocsameeran@gmail.com>
Date: Wed 11 Jul, 2018, 11:48 PM
Subject: Re: [csmith-dev] Building and testing with csmith
To: John Regehr <regehr@cs.utah.edu>




On Wed 11 Jul, 2018, 11:24 PM John Regehr, <regehr@cs.utah.edu> wrote:
 > 1.Is it possible for me to detect the sample bugs explained
 > here(https://embed.cs.utah.edu/csmith/sample.html)
 > <https://embed.cs.utah.edu/csmith/sample.html%29>?, as it is
 > mentioned to use
 > gcc 4.4.3 (32-bit), the default compiler on Ubuntu 10.04.1
 > Or do I need to go to the older version?
Those sample bugs will only work with the specified version of Csmith.
You should instead use the current version.

It should not be hard to find bugs in any older version of gcc,
something in the 4.0, 4.1, or 4.2 range would be good.
 > 2.Where could be this  driver0.sh?Is it the name of the bash script
 > which we created  above ?
I don't know where you read about driver0.sh
It was here:
regehr@home:~$ ./driver0.sh
test.c: In function 'func_108':
test.c:1000: internal compiler error: in c_common_type, at c-typeck.c:531
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The easiest way to find bugs is to just:

- make a random program
Is this the correct command for it using any seedvalue.
csmith --bitfields --packed-struct -s <seed>
- compile it using gcc -O3
- look for a crash

I suggest writing your own script to do this, it will only be a few
lines of Python or Perl or Bash or whatever scripting language you use.

John