https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109996

--- Comment #6 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to mcccs from comment #5)
> Created attachment 61396 [details]
> adapted for trunk and older GCCs and Clang, removed warnings
> 
> Here's the a little bit hand-simplified version (I mostly removed redundant
> attributes and header lines) that works in earlier GCCs, LLVM, latest trunk.
> LLVM's sanitizers don't find a problem.
> 

For these, add a check into platform_main_end that just aborts on the wrong
checksum.

Then to do better, run the good + bad binaries like `diff -u <(./good 1)
<(./bad 1)` (the '1' IIRC is how you get the verbose output of checksums at
each stage), then you can drop everything after the first difference and add an
abort on that instead.

Reply via email to