Skip to content

An Error "Command SwiftCompile failed with a nonzero exit code" Occurs in Xcode 16.1 and Later #77942

@pa-tsuyoshi-tonobe

Description

@pa-tsuyoshi-tonobe

Description

When building with strict concurrency checking set to complete in Xcode 16.1 or later, the error message "Command SwiftCompile failed with a nonzero exit code" appears.

This issue persists in the latest Xcode 16.2 beta 3, but it does not occur in Xcode 16.0.

The message 'Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.' was displayed in the Report Navigator logs.

Reproduction

Stack dump:

0. Program arguments: /Applications/Xcode-16.1.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c - ...
1. Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
2. Compiling with effective version 5.10
3. Contents of ...
4. While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for )
5. While running pass #3213 SILFunctionTransform "TransferNonSendable" on SILFunction "".for 'processFetchGroupsSuccess(with:)' ()

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           0x0000000105dfe9ac llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x0000000105dfcc00 llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x0000000105dfef78 SignalHandler(int) + 292
3  libsystem_platform.dylib 0x00000001848e2584 _sigtramp + 56
4  swift-frontend           0x00000001015bf834 getDiagnosticBehaviorLimitForCapturedValue(swift::CapturedValue) + 36
5  swift-frontend           0x00000001015bf834 getDiagnosticBehaviorLimitForCapturedValue(swift::CapturedValue) + 36
6  swift-frontend           0x00000001015b9d48 (anonymous namespace)::TransferNonSendableImpl::emitDiagnostics() + 18940
7  swift-frontend           0x00000001015b515c (anonymous namespace)::TransferNonSendable::run() + 460
8  swift-frontend           0x00000001015ea988 swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 3448
9  swift-frontend           0x00000001015e6f6c swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 11968
10 swift-frontend           0x00000001016204b8 swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 56
11 swift-frontend           0x0000000101603e1c 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
12 swift-frontend           0x0000000101606598 swift::runSILDiagnosticPasses(swift::SILModule&) + 612
13 swift-frontend           0x0000000100b7cfc4 swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 84
14 swift-frontend           0x00000001007a7cb0 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*) + 1376
15 swift-frontend           0x00000001007a6ebc swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 984
16 swift-frontend           0x00000001007aa174 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1684
17 swift-frontend           0x00000001007a8ea0 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3572
18 swift-frontend           0x000000010072ff64 swift::mainEntry(int, char const**) + 3680
19 dyld                     0x0000000184527154 start + 2476

Expected behavior

Building succeeds with strict concurrency checking set to 'complete' in Xcode 16.1 or later.

Environment

  • Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
  • Compiling with effective version 5.10
  • Xcode 16.1 (16B40)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    SILOptimizerArea → compiler: SIL optimization passesbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfconcurrencyFeature: umbrella label for concurrency language featurescrashBug: A crash, i.e., an abnormal termination of software

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions