bgra8 wrote:

@tbaederr early heads-up: this patch introduces a `clang` crash.

I don't have yet a reproducer, but here's the stack:

```
 #0 0x0000558360594cb8 llvm::sys::RunSignalHandlers() (bin/clang+0x8794cb8)
 #1 0x00005583605555f6 CrashRecoverySignalHandler(int) (bin/clang+0x87555f6)
 #2 0x00007f119d4f11c0 __restore_rt (/usr/grte/v5/lib64/libpthread.so.0+0x151c0)
 #3 0x000055835db72d29 clang::Lexer::SkipWhitespace(clang::Token&, char const*, 
bool&) (bin/clang+0x5d72d29)
 #4 0x000055835db77176 clang::Lexer::LexTokenInternal(clang::Token&, bool) 
(bin/clang+0x5d77176)
 #5 0x000055835c3a6563 
clang::TextDiagnostic::emitSnippetAndCaret(clang::FullSourceLoc, 
clang::DiagnosticsEngine::Level, 
llvm::SmallVectorImpl<clang::CharSourceRange>&, 
llvm::ArrayRef<clang::FixItHint>) (bin/clang+0x45a6563)
 #6 0x000055835c391ac8 
clang::DiagnosticRenderer::emitDiagnostic(clang::FullSourceLoc, 
clang::DiagnosticsEngine::Level, llvm::StringRef, 
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>, 
llvm::PointerUnion<clang::Diagnostic const*, clang::StoredDiagnostic const*>) 
(bin/clang+0x4591ac8)
 #7 0x000055835c393442 
clang::DiagnosticRenderer::emitSingleMacroExpansion(clang::FullSourceLoc, 
clang::DiagnosticsEngine::Level, llvm::ArrayRef<clang::CharSourceRange>) 
(bin/clang+0x4593442)
 #8 0x000055835c392279 
clang::DiagnosticRenderer::emitMacroExpansions(clang::FullSourceLoc, 
clang::DiagnosticsEngine::Level, llvm::ArrayRef<clang::CharSourceRange>, 
llvm::ArrayRef<clang::FixItHint>) (bin/clang+0x4592279)
 #9 0x000055835c391b13 
clang::DiagnosticRenderer::emitDiagnostic(clang::FullSourceLoc, 
clang::DiagnosticsEngine::Level, llvm::StringRef, 
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>, 
llvm::PointerUnion<clang::Diagnostic const*, clang::StoredDiagnostic const*>) 
(bin/clang+0x4591b13)
#10 0x000055835c3a2993 
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level, 
clang::Diagnostic const&) (bin/clang+0x45a2993)
#11 0x000055835dc1dc50 
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const 
(bin/clang+0x5e1dc50)
#12 0x000055835dc17e98 clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) 
(bin/clang+0x5e17e98)
#13 0x000055835dbd523a (anonymous 
namespace)::PragmaMessageHandler::HandlePragma(clang::Preprocessor&, 
clang::PragmaIntroducer, clang::Token&) (bin/clang+0x5dd523a)
#14 0x000055835dbcf953 
clang::Preprocessor::HandlePragmaDirective(clang::PragmaIntroducer) 
(bin/clang+0x5dcf953)
#15 0x000055835dbd00e5 clang::Preprocessor::Handle_Pragma(clang::Token&) 
(bin/clang+0x5dd00e5)
#16 0x000055835dbc19cd 
clang::Preprocessor::HandleMacroExpandedIdentifier(clang::Token&, 
clang::MacroDefinition const&) (bin/clang+0x5dc19cd)
#17 0x000055835dbe38e4 clang::Preprocessor::HandleIdentifier(clang::Token&) 
(bin/clang+0x5de38e4)
#18 0x000055835dbe3d8d clang::Preprocessor::Lex(clang::Token&) 
(bin/clang+0x5de3d8d)
#19 0x000055835c5aa29d clang::Parser::ConsumeAnyToken(bool) 
(bin/clang+0x47aa29d)
#20 0x000055835c6297f4 
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, 
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, 
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, 
clang::ImplicitTypenameContext) (bin/clang+0x48297f4)
#21 0x000055835c5b090f 
clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, 
clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) 
(bin/clang+0x47b090f)
#22 0x000055835c5b064e 
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, 
clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) 
(bin/clang+0x47b064e)
#23 0x000055835c5af7ba 
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, 
clang::ParsedAttributes&, clang::ParsingDeclSpec*) (bin/clang+0x47af7ba)
#24 0x000055835c5ad877 
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, 
clang::Sema::ModuleImportState&) (bin/clang+0x47ad877)
#25 0x000055835c5a885e clang::ParseAST(clang::Sema&, bool, bool) 
(bin/clang+0x47a885e)
#26 0x000055835c2ec5fa clang::FrontendAction::Execute() (bin/clang+0x44ec5fa)
#27 0x000055835c25d974 
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) 
(bin/clang+0x445d974)
#28 0x000055835b3b1585 
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (bin/clang+0x35b1585)
#29 0x000055835b3a5334 cc1_main(llvm::ArrayRef<char const*>, char const*, 
void*) (bin/clang+0x35a5334)
#30 0x000055835b3a2e64 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, 
llvm::ToolContext const&) (bin/clang+0x35a2e64)
#31 0x000055835c3f3c9e void llvm::function_ref<void 
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__u::optional<llvm::StringRef>>,
 std::__u::basic_string<char, std::__u::char_traits<char>, 
std::__u::allocator<char>>*, bool*) const::$_0>(long) (bin/clang+0x45f3c9e)
#32 0x00005583605553cf 
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) 
(bin/clang+0x87553cf)
#33 0x000055835c3f343b 
clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__u::optional<llvm::StringRef>>,
 std::__u::basic_string<char, std::__u::char_traits<char>, 
std::__u::allocator<char>>*, bool*) const (bin/clang+0x45f343b)
#34 0x000055835c3b2343 
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, 
clang::driver::Command const*&, bool) const (bin/clang+0x45b2343)
#35 0x000055835c3b288f 
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, 
llvm::SmallVectorImpl<std::__u::pair<int, clang::driver::Command const*>>&, 
bool) const (bin/clang+0x45b288f)
#36 0x000055835c3d2e10 
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, 
llvm::SmallVectorImpl<std::__u::pair<int, clang::driver::Command const*>>&) 
(bin/clang+0x45d2e10)
#37 0x000055835b3a22de clang_main(int, char**, llvm::ToolContext const&) 
(bin/clang+0x35a22de)
#38 0x000055835b39f2b4 main (bin/clang+0x359f2b4)
#39 0x00007f119d382633 __libc_start_main (/usr/lib64/libc.so.6+0x61633)
#40 0x000055835b39f1ea _start (bin/clang+0x359f1ea)
clang: error: clang frontend command failed with exit code 139 (use -v to see 
invocation)
clang version trunk (718aac9f7a19227b5c5ec85819a3a5ae24ce32e1)
Target: aarch64-grtev4-linux-gnu
Thread model: posix
```

It would be great to revert while we work on the reproducer.

https://github.com/llvm/llvm-project/pull/66514
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to