This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Break infinite recursion in case of recursive failed CHECKs
ClosedPublic

Authored by kubamracek on May 7 2016, 7:33 AM.

Details

Summary

While debugging ASan and TSan, I sometimes get a recursion during a failed CHECK processing. CheckFailed can call a lot of code (printing, unwinding a stack trace, symbolicating, ...) and this can fail another CHECK. This means I sometimes see a crash due to a infinite recursion stack overflow. Let's stop after 10 failed CHECKs and just kill the process immediately. I also added a Sleep(2) call before the trap, so that other threads still get a chance to print their failed CHECKs.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek updated this revision to Diff 56495.May 7 2016, 7:33 AM
kubamracek retitled this revision from to [sanitizer] Break infinite recursion in case of recursive failed CHECKs.
kubamracek updated this object.
kubamracek added a project: Restricted Project.
dvyukov accepted this revision.May 8 2016, 1:00 AM
dvyukov edited edge metadata.

LGTM, but please wait for few days if somebody else wants to chime in.

This revision is now accepted and ready to land.May 8 2016, 1:00 AM
kcc accepted this revision.May 9 2016, 8:49 AM
kcc edited edge metadata.

LGTM

This revision was automatically updated to reflect the committed changes.