This helps with both debugging llvm-reduce and sometimes getting usefull result even if llvm-reduce crashes
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
- I'm pretty sure it's not okay to allocate memory in crash handler.
- We can't know that the internal state is still consistent.
We already store each IR to disk to run the interestingness test on it.
Instead of LastIntersting = ReducedProgram.get();, let's just rewrite the OutputFilename each time.
i agree with both points but all i was trying to do i salvage what can be salvaged.
We already store each IR to disk to run the interestingness test on it.
Instead of LastIntersting = ReducedProgram.get();, let's just rewrite the OutputFilename each time.
yeah this is a better idea.
This seems fine to me, thanks.
If you have llvm-reduce crashers, do let me know, i'm interested.
llvm/tools/llvm-reduce/llvm-reduce.cpp | ||
---|---|---|
84–87 | I wonder if we want do to something special if input == output? |
i had one but i has been fixed by 6187eeb683d8c639282d437e6af585e9b7f9c93e.
llvm/tools/llvm-reduce/llvm-reduce.cpp | ||
---|---|---|
84–87 | we could save the original into its original name plus some post-fix like .old before overwriting. |
I wonder if we want do to something special if input == output?