Open compnerd opened 1 week ago
Reproduces on Linux
I confirmed using godbolt that this crashes on Linux as well.
Crashes on mac as well:
Assertion failed: (!foundLocalKill && "found local kill for non-local gen?!"), function visitBlockFromGen, file VisitBarrierAccessScopes.h, line 202.
...
7 swift-frontend 0x00000001073f93ec (anonymous namespace)::DeinitBarriers::compute() (.cold.49) + 0
8 swift-frontend 0x0000000101d7a2d4 (anonymous namespace)::DeinitBarriers::compute() + 7388
9 swift-frontend 0x0000000101d77d5c hoistDestroys(swift::SILValue, bool, llvm::SmallPtrSetImpl<swift::SILInstruction*>&, swift::InstructionDeleter&, swift::BasicCalleeAnalysis*) + 1044
10 swift-frontend 0x0000000101d7d534 (anonymous namespace)::DestroyAddrHoisting::run() + 1888
Can also confirm it crashes on my mac:
Assertion failed: (!foundLocalKill && "found local kill for non-local gen?!"), function visitBlockFromGen, file VisitBarrierAccessScopes.h, line 202.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /Users/hiroshi/dev/swift-project/build/Ninja-ReleaseAssert+swift-DebugAssert/swift-macosx-arm64/bin/swift-frontend -frontend -c -primary-file test.swift -target arm64-apple-darwin23.6.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -color-diagnostics -O -in-process-plugin-server-path /Users/hiroshi/dev/swift-project/build/Ninja-ReleaseAssert+swift-DebugAssert/swift-macosx-arm64/lib/swift/host/libSwiftInProcPluginServer.dylib -plugin-path /Users/hiroshi/dev/swift-project/build/Ninja-ReleaseAssert+swift-DebugAssert/swift-macosx-arm64/lib/swift/host/plugins -plugin-path /Users/hiroshi/dev/swift-project/build/Ninja-ReleaseAssert+swift-DebugAssert/swift-macosx-arm64/local/lib/swift/host/plugins -dwarf-version=4 -module-name test -o /var/folders/ww/kxcj3hm12kd92gcwr9t3y7k40000gq/T/test-5cc2ac.o
1. Swift version 6.1-dev (LLVM 94d9cd16d9b38ed, Swift 2affbd8945c02a3)
2. Compiling with effective version 5.10
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for test)
4. While running pass #5191 SILFunctionTransform "DestroyAddrHoisting" on SILFunction "@$s4test1fyyAA1EOSgF".
for 'f(_:)' (at test.swift:11:1)
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 0x000000010b401038 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 swift-frontend 0x000000010b3ff248 llvm::sys::RunSignalHandlers() + 112
2 swift-frontend 0x000000010b4016dc SignalHandler(int) + 352
3 libsystem_platform.dylib 0x000000018c1ba584 _sigtramp + 56
4 libsystem_pthread.dylib 0x000000018c189c20 pthread_kill + 288
5 libsystem_c.dylib 0x000000018c096a30 abort + 180
6 libsystem_c.dylib 0x000000018c095d20 err + 0
7 swift-frontend 0x0000000104084290 swift::VisitBarrierAccessScopes<(anonymous namespace)::DeinitBarriers::DestroyReachability, (anonymous namespace)::DeinitBarriers::DestroyReachability>::visitBlockFromGen(swift::SILInstruction*) + 332
8 swift-frontend 0x0000000104082554 swift::VisitBarrierAccessScopes<(anonymous namespace)::DeinitBarriers::DestroyReachability, (anonymous namespace)::DeinitBarriers::DestroyReachability>::visit() + 608
9 swift-frontend 0x0000000104081a78 (anonymous namespace)::DeinitBarriers::DestroyReachability::solve() + 80
10 swift-frontend 0x0000000104080c84 (anonymous namespace)::DeinitBarriers::compute() + 60
11 swift-frontend 0x00000001040808e4 (anonymous namespace)::HoistDestroys::perform() + 296
12 swift-frontend 0x00000001040806fc hoistDestroys(swift::SILValue, bool, llvm::SmallPtrSetImpl<swift::SILInstruction*>&, swift::InstructionDeleter&, swift::BasicCalleeAnalysis*) + 492
13 swift-frontend 0x000000010408e978 (anonymous namespace)::DestroyAddrHoisting::run() + 1644
14 swift-frontend 0x0000000103e3e468 swift::SILPassManager::runPassOnFunction(unsigned int, swift::SILFunction*) + 1460
15 swift-frontend 0x0000000103e3f62c swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 796
16 swift-frontend 0x0000000103e434e4 swift::SILPassManager::execute() + 552
17 swift-frontend 0x0000000103e3c4c8 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 380
18 swift-frontend 0x0000000103e3c2bc swift::ExecuteSILPipelineRequest::evaluate(swift::Evaluator&, swift::SILPipelineExecutionDescriptor) const + 96
19 swift-frontend 0x0000000103ead5f8 std::__1::tuple<> swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::callDerived<0ul>(swift::Evaluator&, std::__1::integer_sequence<unsigned long, 0ul>) const + 92
20 swift-frontend 0x0000000103ead55c swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 32
21 swift-frontend 0x0000000103e71158 swift::ExecuteSILPipelineRequest::OutputType swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()>(swift::ExecuteSILPipelineRequest const&, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()) + 204
22 swift-frontend 0x0000000103e71080 swift::ExecuteSILPipelineRequest::OutputType swift::Evaluator::operator()<swift::ExecuteSILPipelineRequest, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'(), (void*)0>(swift::ExecuteSILPipelineRequest const&, swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest)::'lambda'()) + 32
23 swift-frontend 0x0000000103e3c5bc swift::ExecuteSILPipelineRequest::OutputType swift::evaluateOrFatal<swift::ExecuteSILPipelineRequest>(swift::Evaluator&, swift::ExecuteSILPipelineRequest) + 32
24 swift-frontend 0x0000000103e3c590 swift::executePassPipelinePlan(swift::SILModule*, swift::SILPassPipelinePlan const&, bool, swift::irgen::IRGenModule*) + 124
25 swift-frontend 0x0000000103e911a8 swift::runSILOptimizationPasses(swift::SILModule&) + 196
26 swift-frontend 0x0000000102ba4214 performSILOptimizations(swift::CompilerInvocation&, swift::SILModule*) + 208
27 swift-frontend 0x0000000102ba3ff0 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 184
28 swift-frontend 0x00000001026c2630 performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 768
29 swift-frontend 0x00000001026c1ee0 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 672
30 swift-frontend 0x00000001026e455c performAction(swift::CompilerInstance&, int&, swift::FrontendObserver*)::$_27::operator()(swift::CompilerInstance&) const + 140
31 swift-frontend 0x00000001026e44c0 bool llvm::function_ref<bool (swift::CompilerInstance&)>::callback_fn<performAction(swift::CompilerInstance&, int&, swift::FrontendObserver*)::$_27>(long, swift::CompilerInstance&) + 32
32 swift-frontend 0x00000001026e3870 llvm::function_ref<bool (swift::CompilerInstance&)>::operator()(swift::CompilerInstance&) const + 40
33 swift-frontend 0x00000001026e2748 withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) + 452
34 swift-frontend 0x00000001026dceb4 performAction(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1268
35 swift-frontend 0x00000001026c41f8 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 256
36 swift-frontend 0x00000001026c3630 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 1876
37 swift-frontend 0x00000001023409c8 run_driver(llvm::StringRef, llvm::ArrayRef<char const*>, llvm::ArrayRef<char const*>) + 324
38 swift-frontend 0x000000010233fddc swift::mainEntry(int, char const**) + 1160
39 swift-frontend 0x000000010233f560 main + 36
40 dyld 0x000000018bdff154 start + 2476
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
Description
No response
Reproduction
Stack dump
Swift version 6.1-dev (LLVM 5728735dd595a22, Swift 95c6590e575d8eb) Target: x86_64-unknown-windows-msvc