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

Re: [creduce-bugs] creduce bug report

I agree with Eric, and I'll add that this (and more) is covered in "creduce --help".


On 11/10/15 4:20 AM, Eric Eide wrote:
Ugur Koc <ukoc@cs.umd.edu> writes:

I updated it to creduce 2.5.0 (ef3037e) by following command:
git clone https://github.com/csmith-project/creduce.git

Now it reduces the input file down to 0 (empty file).
I am running my interestingness script on the empty file, it returns 1.
Here is my interestingness script.

I haven't run your script, but from a quick look at it, these are the things
that I noticed as potential problems:

+ Line 3: You probably need to refer to the Makefile by an absolute pathname,
   e.g., "make -f /.../Makefile".

+ Line 10: This command probably should refer to the file being reduced by a
   *relative* pathname.  As-is, the command doesn't obviously refer to any file
   that is being reduced.

This bit of the C-Reduce help text might help to clarify when the test should
use an absolute pathname and when it should use a relative pathname:

C-Reduce runs the interestingness test in a fresh temporary directory
containing only the partially reduced file(s). Thus, when the
interestingness test examines a partially reduced file, it must do so
using a relative path to the current working directory. On the other
hand, when the interestingness test refers to any file that is not
being reduced, this should be done using an absolute path.

Lookign at the script, it looks like it might succeed on an empty file.
C-Reducde runs the script in a directory containing an empty file.  The `make'
fails because of the missing Makefile, but it doesn't print the error you are
looking for, so the script continues.  Then `cppcheck' looks at the original
file (not the empty, reduced file), and produces the warning that you're
looking for.  So the script returns 0, and C-Reduce gives you the reduced file
--- the empty file.