After #986, building with -DENABLE_SWIFT=ON and a -DCMAKE_BUILD_TYPE that is not Release
or RelWithDebInfo
causes swift-frontend to crash generating IR for TestAKBindings.swift.
Seen with Xcode 16 beta 5 in CI and locally, and beta 4 in CI.
Needs reduction and an upstream swiftc bug report.
[41/43] Building Swift Module 'TestAKBindings' with 1 source
FAILED: Lagom/Tests/AK/CMakeFiles/TestAKBindings.dir/TestAKBindings.swift.o
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -target arm64-apple-macosx14.6 -j 12 -num-threads 12 -c -DENABLE_COMPILETIME_FORMAT_CHECK -module-name TestAKBindings -Onone -g -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -incremental -color-diagnostics -Xcc -std=c++23 -cxx-interoperability-mode=default -Xcc -Wall -Xcc -Wextra -Xcc -fno-exceptions -Xcc -ffp-contract=off -Xcc -Wcast-qual -Xcc -Wformat=2 -Xcc -Wimplicit-fallthrough -Xcc -Wmissing-declarations -Xcc -Wsuggest-override -Xcc -Wno-invalid-offsetof -Xcc -Wno-unknown-warning-option -Xcc -Wno-unused-command-line-argument -Xcc -Werror -Xcc -fconstexpr-steps=16777216 -Xcc -Wmissing-prototypes -Xcc -Wno-implicit-const-int-float-conversion -Xcc -Wno-user-defined-literals -Xcc -Wno-vla-cxx-extension -Xcc -Wno-unqualified-std-cast-call -Xcc -fstack-protector-strong -Xcc -fstrict-flex-arrays=2 -Xcc -Wno-maybe-uninitialized -Xcc -Wno-shorten-64-to-32 -Xcc -fsigned-char -Xcc -ggnu-pubnames -Xcc -fPIC -Xcc -ggdb3 -Xcc -Og -Xcc -Wno-overloaded-virtual -Xcc -Wno-unused-private-field -parse-as-library -Xcc -ivfsoverlay/Users/andrew/Source/ladybird-browser/Build/ladybird-debug/Lagom/AK/vfs_overlay.yaml -output-file-map Lagom/Tests/AK/CMakeFiles/TestAKBindings.dir/Debug/output-file-map.json -I /Users/andrew/Source/ladybird-browser -I /Users/andrew/Source/ladybird-browser/Userland/Services -I /Users/andrew/Source/ladybird-browser/Userland/Libraries -I /Users/andrew/Source/ladybird-browser/Build/ladybird-debug/Lagom -I /Users/andrew/Source/ladybird-browser/Build/ladybird-debug/Lagom/Userland/Services -I /Users/andrew/Source/ladybird-browser/Build/ladybird-debug/Lagom/Userland/Libraries -I /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I /Users/andrew/Source/ladybird-browser/Meta/Lagom/../.. -I /Users/andrew/Source/ladybird-browser/Meta/Lagom/../../Userland -I /Users/andrew/Source/ladybird-browser/Meta/Lagom/../../Userland/Libraries -I /Users/andrew/Source/ladybird-browser/Meta/Lagom/../../Userland/Services -I /Users/andrew/Source/ladybird-browser/Build/ladybird-debug /Users/andrew/Source/ladybird-browser/Tests/AK/TestAKBindings.swift
error: compile command failed due to signal 11 (use -v to see invocation)
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -frontend -c -primary-file /Users/andrew/Source/ladybird-browser/Tests/AK/TestAKBindings.swift -emit-reference-dependencies-path Lagom/Tests/AK/CMakeFiles/TestAKBindings.dir/TestAKBindings.swift.o.swiftdeps -target arm64-apple-macosx14.6 -Xllvm -aarch64-use-tbi -enable-objc-interop -stack-check -cxx-interoperability-mode=default -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk -I /Users/andrew/Source/ladybird-browser -I /Users/andrew/Source/ladybird-browser/Userland/Services -I /Users/andrew/Source/ladybird-browser/Userland/Libraries -I /Users/andrew/Source/ladybird-browser/Build/ladybird-debug/Lagom -I /Users/andrew/Source/ladybird-browser/Build/ladybird-debug/Lagom/Userland/Services -I /Users/andrew/Source/ladybird-browser/Build/ladybird-debug/Lagom/Userland/Libraries -I /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I /Users/andrew/Source/ladybird-browser -I /Users/andrew/Source/ladybird-browser/Userland -I /Users/andrew/Source/ladybird-browser/Userland/Libraries -I /Users/andrew/Source/ladybird-browser/Userland/Services -I /Users/andrew/Source/ladybird-browser/Build/ladybird-debug -color-diagnostics -g -debug-info-format=dwarf -dwarf-version=4 -Onone -D ENABLE_COMPILETIME_FORMAT_CHECK -new-driver-path /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-driver -empty-abi-descriptor -resource-dir /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /Users/andrew/Source/ladybird-browser/Build/ladybird-debug -Xcc -std=c++23 -Xcc -Wall -Xcc -Wextra -Xcc -fno-exceptions -Xcc -ffp-contract=off -Xcc -Wcast-qual -Xcc -Wformat=2 -Xcc -Wimplicit-fallthrough -Xcc -Wmissing-declarations -Xcc -Wsuggest-override -Xcc -Wno-invalid-offsetof -Xcc -Wno-unknown-warning-option -Xcc -Wno-unused-command-line-argument -Xcc -Werror -Xcc -fconstexpr-steps=16777216 -Xcc -Wmissing-prototypes -Xcc -Wno-implicit-const-int-float-conversion -Xcc -Wno-user-defined-literals -Xcc -Wno-vla-cxx-extension -Xcc -Wno-unqualified-std-cast-call -Xcc -fstack-protector-strong -Xcc -fstrict-flex-arrays=2 -Xcc -Wno-maybe-uninitialized -Xcc -Wno-shorten-64-to-32 -Xcc -fsigned-char -Xcc -ggnu-pubnames -Xcc -fPIC -Xcc -ggdb3 -Xcc -Og -Xcc -Wno-overloaded-virtual -Xcc -Wno-unused-private-field -Xcc -ivfsoverlay/Users/andrew/Source/ladybird-browser/Build/ladybird-debug/Lagom/AK/vfs_overlay.yaml -module-name TestAKBindings -disable-clang-spi -target-sdk-version 15.0 -target-sdk-name macosx15.0 -external-plugin-path /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins#/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server -external-plugin-path /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/lib/swift/host/plugins#/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server -plugin-path /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/lib/swift/host/plugins -parse-as-library -num-threads 12 -o Lagom/Tests/AK/CMakeFiles/TestAKBindings.dir/TestAKBindings.swift.o
1. Apple Swift version 6.0 (swiftlang-6.0.0.7.6 clang-1600.0.24.1)
2. Compiling with effective version 5.10
3. While evaluating request IRGenRequest(IR Generation for file "/Users/andrew/Source/ladybird-browser/Tests/AK/TestAKBindings.swift")
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 0x0000000109e2d194 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1 swift-frontend 0x0000000109e2b3e8 llvm::sys::RunSignalHandlers() + 112
2 swift-frontend 0x0000000109e2d760 SignalHandler(int) + 292
3 libsystem_platform.dylib 0x00000001944de584 _sigtramp + 56
4 swift-frontend 0x0000000107283ad4 clang::CodeGen::ConstantAggregateBuilderBase::getRelativeOffsetToPosition(llvm::IntegerType*, llvm::Constant*, unsigned long) + 176
5 swift-frontend 0x0000000107283ad4 clang::CodeGen::ConstantAggregateBuilderBase::getRelativeOffsetToPosition(llvm::IntegerType*, llvm::Constant*, unsigned long) + 176
6 swift-frontend 0x0000000104ea9b94 swift::irgen::IRGenModule::getAddrOfStringForTypeRef(swift::irgen::SymbolicMangling const&, swift::irgen::MangledTypeRefRole) + 1420
7 swift-frontend 0x0000000104d73d24 getTypeRefImpl(swift::irgen::IRGenModule&, swift::CanType, swift::CanGenericSignature, swift::irgen::MangledTypeRefRole) + 1144
8 swift-frontend 0x0000000104d7901c ReflectionMetadataBuilder::addTypeRef(swift::CanType, swift::CanGenericSignature, swift::irgen::MangledTypeRefRole) + 72
9 swift-frontend 0x0000000104d78aac FixedTypeMetadataBuilder::layout() + 172
10 swift-frontend 0x0000000104d79524 ReflectionMetadataBuilder::emit(std::__1::optional<llvm::function_ref<llvm::Constant* (swift::irgen::IRGenModule&, swift::irgen::ConstantInit)>>, char const*) + 48
11 swift-frontend 0x0000000104d76cd4 swift::irgen::IRGenModule::emitFieldDescriptor(swift::NominalTypeDecl const*) + 1460
12 swift-frontend 0x0000000104c67228 swift::irgen::IRGenerator::emitLazyDefinitions() + 3184
13 swift-frontend 0x0000000104dd1220 swift::IRGenRequest::evaluate(swift::Evaluator&, swift::IRGenDescriptor) const + 4964
14 swift-frontend 0x0000000104e18e28 swift::SimpleRequest<swift::IRGenRequest, swift::GeneratedModule (swift::IRGenDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::IRGenRequest const&, swift::Evaluator&) + 176
15 swift-frontend 0x0000000104dda010 swift::IRGenRequest::OutputType swift::Evaluator::getResultUncached<swift::IRGenRequest, swift::IRGenRequest::OutputType swift::evaluateOrFatal<swift::IRGenRequest>(swift::Evaluator&, swift::IRGenRequest)::'lambda'()>(swift::IRGenRequest const&, swift::IRGenRequest::OutputType swift::evaluateOrFatal<swift::IRGenRequest>(swift::Evaluator&, swift::IRGenRequest)::'lambda'()) + 784
16 swift-frontend 0x0000000104dd3a48 swift::performIRGeneration(swift::FileUnit*, swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::StringRef, llvm::GlobalVariable**) + 180
17 swift-frontend 0x00000001047e4d5c generateIR(swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>>, swift::PrimarySpecificPaths const&, llvm::StringRef, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, llvm::GlobalVariable*&, llvm::ArrayRef<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>) + 156
18 swift-frontend 0x00000001047e0588 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*) + 2176
19 swift-frontend 0x00000001047df474 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 984
20 swift-frontend 0x00000001047e2728 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1680
21 swift-frontend 0x00000001047e1458 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3572
22 swift-frontend 0x000000010476850c swift::mainEntry(int, char const**) + 3680
23 dyld 0x0000000194123154 start + 2476
ninja: build stopped: subcommand failed.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too