-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Compiler crash regression in 6.1 #80269
Labels
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
Comments
Crash looks a bit different in Swift 6 language mode: $ DEVELOPER_DIR=/Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer xcrun swiftc -O -swift-version 6 -enable-actor-data-race-checks crash_test.swift
error: compile command failed due to signal 6 (use -v to see invocation)
BadInst: %3 = extract_executor %0 : ${ var W<Int> } // user: %10
<unknown>:0: error: fatal error encountered during compilation; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
<unknown>:0: note: send-non-sendable: Found instruction that is not allowed to have non-Sendable parameters with such parameters?!
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file crash_test.swift -target arm64-apple-macosx15.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -sdk /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -color-diagnostics -swift-version 6 -O -enable-actor-data-race-checks -new-driver-path /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver -empty-abi-descriptor -resource-dir /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -module-name crash_test -disable-clang-spi -target-sdk-version 15.4 -target-sdk-name macosx15.4 -external-plugin-path /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins#/Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server -external-plugin-path /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/lib/swift/host/plugins#/Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server -in-process-plugin-server-path /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -plugin-path /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Applications/Xcode-16.3.0-Release.Candidate.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/lib/swift/host/plugins -enable-default-cmo -o /var/folders/d4/klf7m4jx3cgcdmz7n2sbsq5w0000gn/T/TemporaryDirectory.JVsL13/crash_test-1.o
1. Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
2. Compiling with the current language version
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for crash_test)
4. While running pass #247 SILFunctionTransform "SendNonSendable" on SILFunction "@$s10crash_test1AC1fSiyYaF2$xL_AA1WVySiGvg".
for getter for $x (at crash_test.swift:11:12)
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 0x000000010a8d6c28 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 swift-frontend 0x000000010a8d4a60 llvm::sys::RunSignalHandlers() + 112
2 swift-frontend 0x000000010a8d7264 SignalHandler(int) + 360
3 libsystem_platform.dylib 0x000000018d08ade4 _sigtramp + 56
4 libsystem_pthread.dylib 0x000000018d053f70 pthread_kill + 288
5 libsystem_c.dylib 0x000000018cf60908 abort + 128
6 swift-frontend 0x0000000104acb764 swift::DiagnosticHelper::~DiagnosticHelper() + 0
7 swift-frontend 0x000000010a84667c llvm::report_fatal_error(llvm::Twine const&, bool) + 280
8 swift-frontend 0x000000010a846564 llvm::report_fatal_error(llvm::Twine const&, bool) + 0
9 swift-frontend 0x0000000105338ca0 swift::regionanalysisimpl::PartitionOpTranslator::translateSILInstruction(swift::SILInstruction*) + 3128
10 swift-frontend 0x00000001053356a8 swift::RegionAnalysis::newFunctionAnalysis(swift::SILFunction*) + 2360
11 swift-frontend 0x000000010558b2d8 (anonymous namespace)::SendNonSendable::run() + 308
12 swift-frontend 0x00000001055c7810 swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 3336
13 swift-frontend 0x00000001055c3c54 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 12100
14 swift-frontend 0x00000001055fec50 swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 52
15 swift-frontend 0x00000001055e26e0 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'()) + 412
16 swift-frontend 0x00000001055e59e0 swift::runSILDiagnosticPasses(swift::SILModule&) + 416
17 swift-frontend 0x0000000104ae866c swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 656
18 swift-frontend 0x0000000104728d90 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*) + 1360
19 swift-frontend 0x00000001047280a8 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1036
20 swift-frontend 0x000000010472b654 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1764
21 swift-frontend 0x0000000104729fd8 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3716
22 swift-frontend 0x00000001046ae0bc swift::mainEntry(int, char const**) + 5428
23 dyld 0x000000018ccd4274 start + 2840 |
|
@tbkka Thank you! |
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.
crash
Bug: A crash, i.e., an abnormal termination of software
triage needed
This issue needs more specific labels
Description
Code that used to compile in Swift 6.0.3 now crashes the compiler with Swift 6.1.
Reproduction
Contents of
crash_test.swift
:This compiles with Swift 6.0.3 but not Swift 6.1:
Stack dump
Expected behavior
Should compile with the Swift 6.1 compiler as it does in Swift 6.0.3.
Environment
swift-driver version: 1.120.5 Apple Swift version 6.1 (swiftlang-6.1.0.110.21 clang-1700.0.13.3)
Target: arm64-apple-macosx15.0
Additional information
No response
The text was updated successfully, but these errors were encountered: