[PATCH] D59118: creduce script for clang crashes

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 11 16:09:47 PDT 2019

rnk added a subscriber: gbiv.
rnk added a comment.

@gbiv already got all my shell quoting comments.

I think we should do one more round of fixes, we can commit that for you, and then move on to the next steps.

Comment at: clang/utils/creduce-clang-crash.py:109
+  open(testfile, 'w').write('\n'.join(test_contents))
+  os.chmod(testfile, os.stat(testfile).st_mode | stat.S_IEXEC)
We could try validating that the interestingness test passes here. If it doesn't, that's a bug in this script, I suppose.

CReduce already does this for the user, but it's not clear with our usage model how to do this.

Comment at: clang/utils/creduce-clang-crash.py:110
+  os.chmod(testfile, os.stat(testfile).st_mode | stat.S_IEXEC)
+  # Call C-Reduce
Let's add a TODO (or FIXME, that's more LLVM-y) here to add a step that runs the full pre-processor with -E and -P here. As we've discussed, it often doesn't work, but when it does, it avoids all those issues with #defines, comments, etc, breaking up topformflat. This doesn't have to be in the first version, of course.

I see @joerg added a comment about this as well.



More information about the cfe-commits mailing list