This is an archive of the discontinued LLVM Phabricator instance.

<rdar://problem/63335596> CrashTracer: clang at clang: llvm::BitstreamWriter::ExitBlock
AcceptedPublic

Authored by ojhunt on Jul 9 2020, 2:24 PM.

Details

Summary

Add a guard for re-entering an SDiagsWriter's HandleDiagnostics
method after we've started finalizing. This is a generic catch
all for unexpected fatal errors so we don't recursive crash inside
the generic llvm error handler.

We also add logic to handle the actual error case in
llvm::~raw_fd_ostream caused by failing to clear errors before
it is destroyed.

Diff Detail

Event Timeline

ojhunt created this revision.Jul 9 2020, 2:24 PM
Herald added a project: Restricted Project. ยท View Herald TranscriptJul 9 2020, 2:24 PM
jfb accepted this revision.Jul 9 2020, 2:26 PM
jfb added inline comments.
clang/include/clang/Basic/DiagnosticFrontendKinds.td
123
$ git grep -i "serializ"  | wc -l
    6053
$ git grep -i "serialis"  | wc -l
       5

Z it is ๐Ÿ˜‰

This revision is now accepted and ready to land.Jul 9 2020, 2:26 PM
ojhunt updated this revision to Diff 276837.Jul 9 2020, 2:30 PM
ojhunt marked an inline comment as done.Jul 9 2020, 2:58 PM
jfb added a comment.Jul 9 2020, 8:33 PM

I don't remember if this will auto-close, since I forgot to add the Phabricator ID to the commit message. In any case it's in: 00c9a504aeed2603bd8bc9b89d753534e929c8e8