[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [creduce-dev] multifile creduce
On 2015.10.19 at 18:17 +0200, John Regehr wrote:
> I've pushed changes to C-Reduce that support reducing more than one file
> at a time. Use cases include:
>
> - reductions for LTO bugs
>
> - reducing a file + its transitive includes when, for whatever reason,
> reducing the preprocessed file does not work
>
> (As always, if you can reduce a preprocessed file, you should do so.)
>
> To support the second case, I wrote a program that copies each
> transitive include file for a C/C++ file into the cwd, renaming files as
> necessary (there are 8 files called "errno.h" under /usr/include on one
> of my machines) and also replacing each <foo>-style include with a
> "foo"-style include. The program is in scripts/localize_headers. To
> use it you need to modify a few variables up at the top. Let me know if
> you have either a good or a bad experience with this script. I'm not
> sure that it is very robust but it has worked for me.
>
> Multifile reduction works by running each pass over all files that are
> being reduced. It is often the case that some files go to zero bytes.
> C-Reduce could at this point try to delete such files, but it doesn't do
> that yet.
>
> I also beefed up C-Reduce's usage info.
>
> clang-delta becomes pretty crashy on non-preprocessed files. I don't
> really know what is going on, but these crashes are largely harmless.
> Please don't kill us with bug reports about this.
>
> Testing appreciated. I've only tested on Linux so far.
There is also https://github.com/marxin/multicreduce, a simple python
script that claims to do the same thing. (I've never used it myself.)
--
Markus