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

Re: [csmith-dev] Script for checking the compiler output at various optimization levels



Hi,
Here are script files for testing the output of compiler(in particular GCC for now) at various optimization levels.

Flow of script:

It creates random program,if program hangs for a long time (considered as 10 sec) it again generates a new random program.Further it checks the output of the compiler at various optimization levels and verifies for the correctness of output generated.
If program terminates,the file generated doesn't have it's output checksum equal,which may point to some bug.


Running commands:
1.Place the scripts in ${CSMITH HOME}.
2.In terminal run following command:-
       bash firstrun.sh

Could you please suggest if any changes are required in the file so we could start fuzzing it for hours.As I am a newbie in shell scripting and have created it taking much help of Google.



On Thu, Aug 16, 2018 at 1:49 AM, Eric Eide <eeide@cs.utah.edu> wrote:
sameeran joshi <gsocsameeran@gmail.com> writes:

> Can anyone suggest me tweaking the script file which is attached below
> for checking if running the binary file the program goes in an
> infinite loop and again continuing the script if it goes in an
> infinite loop.

This is what I would do:

Write another script that runs a given program under a timeout.  If the timeout
occurs, the script kills the program and prints something like "timeout."

In your first script, run the test program by using the second script.

Eric.

--
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX

Attachment: second.sh
Description: application/shellscript

Attachment: firstrun.sh
Description: application/shellscript