Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in HandleInlinedLandingPad #78312

Open
wtholliday opened this issue Dec 20, 2024 · 1 comment
Open

Crash in HandleInlinedLandingPad #78312

wtholliday opened this issue Dec 20, 2024 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. CodeGen crash Bug: A crash, i.e., an abnormal termination of software IRGen LLVM IR generation optimized only Flag: An issue whose reproduction requires optimized compilation

Comments

@wtholliday
Copy link

wtholliday commented Dec 20, 2024

Description

Hitting this crash when attempting to archive a new app. App builds successfully without archiving (whole-module optimization?)

Reproduction

Working on isolating a repro.

Stack dump

Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend           0x0000000105e4aa9c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x0000000105e48cf0 llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x0000000105e4b068 SignalHandler(int) + 292
3  libsystem_platform.dylib 0x00000001975fee04 _sigtramp + 56
4  libsystem_pthread.dylib  0x00000001975c7f70 pthread_kill + 288
5  libsystem_c.dylib        0x00000001974d4908 abort + 128
6  libsystem_malloc.dylib   0x00000001973ddea0 malloc_vreport + 896
7  libsystem_malloc.dylib   0x00000001973e1a24 malloc_report + 64
8  libsystem_malloc.dylib   0x0000000197400184 find_zone_and_free + 528
9  swift-frontend           0x0000000105431ccc HandleInlinedLandingPad(llvm::InvokeInst*, llvm::BasicBlock*, llvm::ClonedCodeInfo&) + 1016
10 swift-frontend           0x000000010542df2c llvm::InlineFunction(llvm::CallBase&, llvm::InlineFunctionInfo&, bool, llvm::AAResults*, bool, llvm::Function*) + 26900
11 swift-frontend           0x000000010353c4bc llvm::InlinerPass::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) + 4228
12 swift-frontend           0x00000001055754c0 llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) + 348
13 swift-frontend           0x0000000105576e34 llvm::DevirtSCCRepeatedPass::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&) + 332
14 swift-frontend           0x00000001055762c8 llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 2320
15 swift-frontend           0x0000000105b82420 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 224
16 swift-frontend           0x000000010353dfa8 llvm::ModuleInlinerWrapperPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 644
17 swift-frontend           0x0000000105b82420 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 224
18 swift-frontend           0x0000000100de1040 swift::performLLVMOptimizations(swift::IRGenOptions const&, llvm::Module*, llvm::TargetMachine*, llvm::raw_pwrite_stream*) + 6200
19 swift-frontend           0x0000000100de22f8 swift::performLLVM(swift::IRGenOptions const&, swift::DiagnosticEngine&, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, llvm::StringRef, llvm::vfs::OutputBackend&, swift::UnifiedStatsReporter*) + 2352
20 swift-frontend           0x0000000100de9520 (anonymous namespace)::LLVMCodeGenThreads::Thread::run() + 156
21 swift-frontend           0x0000000100de9478 (anonymous namespace)::LLVMCodeGenThreads::runThread(void*) + 12
22 libsystem_pthread.dylib  0x00000001975c82e4 _pthread_start + 136
23 libsystem_pthread.dylib  0x00000001975c30fc thread_start + 8

Expected behavior

No crash.

Environment

swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.0

Additional information

No response

@wtholliday wtholliday added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. crash Bug: A crash, i.e., an abnormal termination of software triage needed This issue needs more specific labels labels Dec 20, 2024
@wtholliday wtholliday changed the title Crhash in HandleInlinedLandingPad Crash in HandleInlinedLandingPad Dec 20, 2024
@MaxDesiatov MaxDesiatov added IRGen LLVM IR generation optimized only Flag: An issue whose reproduction requires optimized compilation CodeGen and removed triage needed This issue needs more specific labels labels Dec 21, 2024
@aschwaighofer
Copy link
Contributor

The LLVM backend crashes as it attempts to inline a function that uses C++ exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. CodeGen crash Bug: A crash, i.e., an abnormal termination of software IRGen LLVM IR generation optimized only Flag: An issue whose reproduction requires optimized compilation
Projects
None yet
Development

No branches or pull requests

3 participants