Closed
Description
Description
Compiling code on 6.1 nightly crashes.
I can't provide a simple project for reproduction.
Project: https://github.com/sebsto/swift-aws-lambda-runtime
Branch main
compiles
Branch sebsto/fix_507
causes the crashes
Reproduction
git clone https://github.com/sebsto/swift-aws-lambda-runtime.git
cd swift-aws-lambda-runtime
git fetch --all
git checkout sebsto/fix_507
docker run -it --rm -v .:/work swiftlang/swift:nightly-6.1-jammy bash -c "(cd /work && swift build)"
Stack dump
error: compile command failed due to signal 6 (use -v to see invocation)
swift-frontend: /home/build-user/swift/lib/SIL/IR/SILFunction.cpp:523: SILType swift::SILFunction::mapTypeIntoContext(SILType) const: Assertion `!type.hasPrimaryArchetype()' failed.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /usr/bin/swift-frontend -frontend -c /work/Sources/AWSLambdaRuntime/ControlPlaneRequest.swift /work/Sources/AWSLambdaRuntime/ControlPlaneRequestEncoder.swift -primary-file /work/Sources/AWSLambdaRuntime/FoundationSupport/Context+Foundation.swift -primary-file /work/Sources/AWSLambdaRuntime/FoundationSupport/Lambda+JSON.swift /work/Sources/AWSLambdaRuntime/FoundationSupport/Vendored/ByteBuffer-foundation.swift /work/Sources/AWSLambdaRuntime/FoundationSupport/Vendored/JSON+ByteBuffer.swift /work/Sources/AWSLambdaRuntime/Lambda+Codable.swift /work/Sources/AWSLambdaRuntime/Lambda+LocalServer.swift /work/Sources/AWSLambdaRuntime/Lambda.swift /work/Sources/AWSLambdaRuntime/LambdaContext.swift /work/Sources/AWSLambdaRuntime/LambdaHandlers.swift /work/Sources/AWSLambdaRuntime/LambdaRequestID.swift /work/Sources/AWSLambdaRuntime/LambdaRuntime+ServiceLifecycle.swift /work/Sources/AWSLambdaRuntime/LambdaRuntime.swift /work/Sources/AWSLambdaRuntime/LambdaRuntimeClient.swift /work/Sources/AWSLambdaRuntime/LambdaRuntimeClientError.swift /work/Sources/AWSLambdaRuntime/LambdaRuntimeClientProtocol.swift /work/Sources/AWSLambdaRuntime/Utils.swift -emit-dependencies-path /work/.build/aarch64-unknown-linux-gnu/debug/AWSLambdaRuntime.build/Context+Foundation.d -emit-reference-dependencies-path /work/.build/aarch64-unknown-linux-gnu/debug/AWSLambdaRuntime.build/Context+Foundation.swiftdeps -emit-dependencies-path /work/.build/aarch64-unknown-linux-gnu/debug/AWSLambdaRuntime.build/Lambda+JSON.d -emit-reference-dependencies-path /work/.build/aarch64-unknown-linux-gnu/debug/AWSLambdaRuntime.build/Lambda+JSON.swiftdeps -target aarch64-unknown-linux-gnu -Xllvm -aarch64-use-tbi -disable-objc-interop -I /work/.build/aarch64-unknown-linux-gnu/debug/Modules -color-diagnostics -enable-testing -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /work/.build/aarch64-unknown-linux-gnu/debug/ModuleCache -swift-version 6 -Onone -D SWIFT_PACKAGE -D DEBUG -D FoundationJSONSupport -D LocalServerSupport -D ServiceLifecycleSupport -empty-abi-descriptor -resource-dir /usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /work -Xcc -fmodule-map-file=/work/.build/checkouts/swift-atomics/Sources/_AtomicsShims/include/module.modulemap -Xcc -I -Xcc /work/.build/checkouts/swift-atomics/Sources/_AtomicsShims/include -Xcc -fmodule-map-file=/work/.build/aarch64-unknown-linux-gnu/debug/CNIOWASI.build/module.modulemap -Xcc -I -Xcc /work/.build/checkouts/swift-nio/Sources/CNIOWASI/include -Xcc -fmodule-map-file=/work/.build/checkouts/swift-nio/Sources/CNIOWindows/include/module.modulemap -Xcc -I -Xcc /work/.build/checkouts/swift-nio/Sources/CNIOWindows/include -Xcc -fmodule-map-file=/work/.build/aarch64-unknown-linux-gnu/debug/CNIOLinux.build/module.modulemap -Xcc -I -Xcc /work/.build/checkouts/swift-nio/Sources/CNIOLinux/include -Xcc -fmodule-map-file=/work/.build/aarch64-unknown-linux-gnu/debug/CNIODarwin.build/module.modulemap -Xcc -I -Xcc /work/.build/checkouts/swift-nio/Sources/CNIODarwin/include -Xcc -fmodule-map-file=/work/.build/aarch64-unknown-linux-gnu/debug/CNIOAtomics.build/module.modulemap -Xcc -I -Xcc /work/.build/checkouts/swift-nio/Sources/CNIOAtomics/include -Xcc -fmodule-map-file=/work/.build/aarch64-unknown-linux-gnu/debug/CNIOLLHTTP.build/module.modulemap -Xcc -I -Xcc /work/.build/checkouts/swift-nio/Sources/CNIOLLHTTP/include -Xcc -fPIC -Xcc -g -Xcc -fno-omit-frame-pointer -module-name AWSLambdaRuntime -package-name work -in-process-plugin-server-path /usr/lib/swift/host/libSwiftInProcPluginServer.so -plugin-path /usr/lib/swift/host/plugins -plugin-path /usr/local/lib/swift/host/plugins -parse-as-library -o /work/.build/aarch64-unknown-linux-gnu/debug/AWSLambdaRuntime.build/Context+Foundation.swift.o -o /work/.build/aarch64-unknown-linux-gnu/debug/AWSLambdaRuntime.build/Lambda+JSON.swift.o -index-store-path /work/.build/aarch64-unknown-linux-gnu/debug/index/store -index-system-modules
1. Swift version 6.1-dev (LLVM 08670c03fe16573, Swift 493744d5e4900b2)
2. Compiling with the current language version
3. While evaluating request IRGenRequest(IR Generation for file "/work/Sources/AWSLambdaRuntime/FoundationSupport/Lambda+JSON.swift")
4. While emitting IR SIL function "@$s16AWSLambdaRuntime06LambdaB0C7decoder7encoder4bodyACyAA0C14CodableAdapterVyAA0c7HandlerH0Vyqd__qd_0_AA07ClosureI0Vyqd__qd_0_GGqd__qd_0_AA0C16JSONEventDecoderVAA0C17JSONOutputEncoderVyqd_0_GGG20FoundationEssentials11JSONDecoderC_AV11JSONEncoderCqd_0_qd___AA0C7ContextVtYaKcntcATRszSeRd__SERd_0_r0_lufC".
for 'init(decoder:encoder:body:)' (at /work/Sources/AWSLambdaRuntime/FoundationSupport/Lambda+JSON.swift:91:24)
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 0x0000aaaaf1129074
1 swift-frontend 0x0000aaaaf1126ec8
2 swift-frontend 0x0000aaaaf1129788
3 linux-vdso.so.1 0x0000ffffa867a7a0 __kernel_rt_sigreturn + 0
4 libc.so.6 0x0000ffffa6acf1f0
5 libc.so.6 0x0000ffffa6a8a67c raise + 28
6 libc.so.6 0x0000ffffa6a77130 abort + 228
7 libc.so.6 0x0000ffffa6a83fd4
8 libc.so.6 0x0000ffffa6a8404c
9 swift-frontend 0x0000aaaaeb2d51a4
10 swift-frontend 0x0000aaaaea8f6d48
11 swift-frontend 0x0000aaaaea8d6080
12 swift-frontend 0x0000aaaaea8d40d4
13 swift-frontend 0x0000aaaaea8d17a8
14 swift-frontend 0x0000aaaaea78f1bc
15 swift-frontend 0x0000aaaaea63f2c0
16 swift-frontend 0x0000aaaaea694ad8
17 swift-frontend 0x0000aaaaea648a10
18 swift-frontend 0x0000aaaaea6413b4
19 swift-frontend 0x0000aaaaea232460
20 swift-frontend 0x0000aaaaea22ed3c
21 swift-frontend 0x0000aaaaea22dd5c
22 swift-frontend 0x0000aaaaea23b2d8
23 swift-frontend 0x0000aaaaea2303c4
24 swift-frontend 0x0000aaaaea22f7d4
25 swift-frontend 0x0000aaaaea016838
26 libc.so.6 0x0000ffffa6a773fc
27 libc.so.6 0x0000ffffa6a774cc __libc_start_main + 152
28 swift-frontend 0x0000aaaaea015a30
[9/25] Compiling MockServer MockHTTPServer.swift
Expected behavior
no crashes :-)
Environment
docker container swiftlang/swift:nightly-6.1-jammy
Swift version 6.1-dev (LLVM 08670c03fe16573, Swift 493744d)
Target: aarch64-unknown-linux-gnu
Additional information
No response