This is an archive of the discontinued LLVM Phabricator instance.

[Lex] Remove timer from #pragma clang __debug crash handler
Needs ReviewPublic

Authored by sammccall on Oct 25 2021, 4:12 PM.

Details

Reviewers
kadircet
aganea
Summary

This seems to be temporary code for testing 28ad9fc20823678881baa0d723834b88ea9e8e3a
which was never removed

Diff Detail

Event Timeline

sammccall requested review of this revision.Oct 25 2021, 4:12 PM
sammccall created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2021, 4:12 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

This Timer is actually the test coverage for that commit. If we don’t want it here, I guess you could move it to the Support unit tests?

This Timer is actually the test coverage for that commit.

Ah, our issue is that it runs in production as well as in the tests. Each time the parser sees the crash pragma it dumps a bunch of output to stderr, even if the pragma is disabled in PP opts.

If we don’t want it here, I guess you could move it to the Support unit tests?

Makes sense. Do I understand right that we want to a crash recovery context, a timer region within it, and then abort() within that?
And we're just verifying we can do that a couple of times without crashing?

aganea added a comment.EditedOct 25 2021, 6:29 PM

That sounds right. You can test that scenario in a debugger, by putting a breakpoint before BuryPointer in clang/tools/driver/driver.cpp and verifying that the TimerGroup still has a pointer to the deleted stack frames, after the CrashRecoveryContext has successfully catched the abort().