This seems to be temporary code for testing 28ad9fc20823678881baa0d723834b88ea9e8e3a
which was never removed
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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?
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?
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().