[clang] [clang-repl] Extend the C support. (PR #89804)
Daniel Thornburgh via cfe-commits
cfe-commits at lists.llvm.org
Tue May 21 16:57:04 PDT 2024
mysterymath wrote:
We've started seeing crashes in Fuchsia's Mac tooclhain's LLDB test suite:
https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-mac-x64/b8747305520511321169/overview
This is the only PR in the blamelist that looks plausible, but there isn't a clear connection to me (or a clear reason why it would be Mac-only). Does anything jump out, or am I barking up the wrong tree?
Stack trace follows:
```
Assertion failed: (D->getLexicalDeclContext() == this && "Decl inserted into wrong lexical context"), function addHiddenDecl, file DeclBase.cpp, line 1692.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. /Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:32:1 <Spelling=/Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:382:22>: at annotation token
#0 0x0000000111461238 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x8ab238)
#1 0x000000011145f179 llvm::sys::RunSignalHandlers() (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x8a9179)
#2 0x0000000111461900 SignalHandler(int) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x8ab900)
#3 0x00007ff807c915ed (/usr/lib/system/libsystem_platform.dylib+0x7ff8004255ed)
#4 0x0000700014de4c40
#5 0x00007ff807b8ab45 (/usr/lib/system/libsystem_c.dylib+0x7ff80031eb45)
#6 0x00007ff807b89e5e (/usr/lib/system/libsystem_c.dylib+0x7ff80031de5e)
#7 0x0000000114a4ae54 clang::DeclContext::addHiddenDecl(clang::Decl*) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x3e94e54)
#8 0x0000000114a4aeae clang::DeclContext::addDecl(clang::Decl*) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x3e94eae)
#9 0x0000000113edeb81 clang::Sema::ActOnStartTopLevelStmtDecl(clang::Scope*) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x3328b81)
#10 0x0000000113a31ccf clang::Parser::ParseTopLevelStmtDecl() (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2e7bccf)
#11 0x0000000113a6d231 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2eb7231)
#12 0x0000000113a45202 clang::Parser::ParseLinkage(clang::ParsingDeclSpec&, clang::DeclaratorContext) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2e8f202)
#13 0x0000000113a6f037 clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2eb9037)
#14 0x0000000113a6e8a5 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2eb88a5)
#15 0x0000000113a6cfd4 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2eb6fd4)
#16 0x0000000113a6ad37 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2eb4d37)
#17 0x0000000113a6a501 clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2eb4501)
#18 0x0000000113956acb clang::ParseAST(clang::Sema&, bool, bool) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2da0acb)
#19 0x0000000113721a53 clang::FrontendAction::Execute() (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2b6ba53)
#20 0x000000011369068d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2ada68d)
#21 0x000000011369cd24 void llvm::function_ref<void ()>::callback_fn<compileModuleImpl(clang::CompilerInstance&, clang::SourceLocation, llvm::StringRef, clang::FrontendInputFile, llvm::StringRef, llvm::StringRef, llvm::function_ref<void (clang::CompilerInstance&)>, llvm::function_ref<void (clang::CompilerInstance&)>)::$_1>(long) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x2ae6d24)
#22 0x000000011145c0fe llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x8a60fe)
#23 0x000000011145c220 RunSafelyOnThread_Dispatch(void*) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x8a6220)
#24 0x000000011145c23f void* llvm::thread::ThreadProxy<std::__2::tuple<void (*)(void*), (anonymous namespace)::RunSafelyOnThreadInfo*>>(void*) (/Volumes/Work/s/w/ir/x/w/llvm_build/lib/liblldb.19.0.0git.dylib+0x8a623f)
#25 0x00007ff807c641d3 (/usr/lib/system/libsystem_pthread.dylib+0x7ff8003f81d3)
#26 0x00007ff807c5fbd3 (/usr/lib/system/libsystem_pthread.dylib+0x7ff8003f3bd3)
```
https://github.com/llvm/llvm-project/pull/89804
More information about the cfe-commits
mailing list