C-Reduce is a tool by Regehr and friends for minimizing C compiler bug reproducers. Imagine if you had a 10,000 line long C file that triggered a Clan

You can use C-Reduce for any language

submited by
Style Pass
2024-11-15 20:30:02

C-Reduce is a tool by Regehr and friends for minimizing C compiler bug reproducers. Imagine if you had a 10,000 line long C file that triggered a Clang bug. You don’t want to send a massive blob to the compiler developers because that’s unhelpful, but you also don’t want to cut it down to size by hand. The good news is that C-Reduce can do that for you. The bad news is that everyone thinks it only works for C.

I ran into a bug with RustPython running scrapscript and wanted to report it. So I ran wrote a script interesting.sh to reproduce the bug:

We use --not-c because otherwise C-Reduce uses a bunch of C-specific passes. If we’re working on Python, it will likely just slow things down (but not materially change the outcome).

Leave a Comment