-
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
$ env SWIFT_SDK_ID=DEVELOPMENT-SNAPSHOT-2025-09-12-a-wasm32-unknown-wasip1 PATH=/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin:$PATH ./build.sh
+++ dirname ./build.sh
++ cd .
++ pwd
+ package_dir=/home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded
+ JAVASCRIPTKIT_EXPERIMENTAL_EMBEDDED_WASM=true
+ swift package --package-path /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded -c release --triple wasm32-unknown-none-wasm js
Building for production...
[0/5] Write sources
[2/5] Write swift-version--44F4E3F61FEA6A0D.txt
[4/6] Compiling JavaScriptKit JSArray.swift
<unknown>:0: warning: flag '-mergeable-symbols' is deprecated
/home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Sources/JavaScriptKit/FundamentalObjects/JSObject+CallAsFunction.swift:176:11: warning: 'JSFunction' is deprecated: Please use JSObject instead. JSFunction is unified with JSObject [#DeprecatedDeclaration]
174 | // Once Embedded Swift supports parameter packs/variadic generics, we can
175 | // replace all variants with a single method each that takes a generic pack.
176 | extension JSFunction {
| |- warning: 'JSFunction' is deprecated: Please use JSObject instead. JSFunction is unified with JSObject [#DeprecatedDeclaration]
| `- note: use 'JSObject' instead
177 |
178 | @discardableResult
[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
error: compile command failed due to signal 6 (use -v to see invocation)
<unknown>:0: warning: flag '-mergeable-symbols' is deprecated
swift-frontend: /home/build-user/llvm-project/llvm/lib/IR/Instructions.cpp:693: void llvm::CallInst::init(FunctionType *, Value *, ArrayRef<Value *>, ArrayRef<OperandBundleDef>, const Twine &): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: /home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend -frontend -c /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/Sources/EmbeddedApp/_thingsThatShouldNotBeNeeded.swift /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/Sources/EmbeddedApp/main.swift -emit-module-path /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/EmbeddedApp.build/EmbeddedApp.swiftmodule -emit-module-doc-path /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/EmbeddedApp.build/EmbeddedApp.swiftdoc -emit-module-source-info-path /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/EmbeddedApp.build/EmbeddedApp.swiftsourceinfo -emit-dependencies-path /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/EmbeddedApp.build/EmbeddedApp.d -serialize-diagnostics-path /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/EmbeddedApp.build/EmbeddedApp.dia -target wasm32-unknown-none-wasm -disable-objc-interop -I /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/Modules -color-diagnostics -Xcc -fcolor-diagnostics -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/ModuleCache -swift-version 5 -O -D SWIFT_PACKAGE -D SWIFT_MODULE_RESOURCE_BUNDLE_UNAVAILABLE -mergeable-symbols -gnone -disable-stack-protector -enable-experimental-feature Embedded -enable-experimental-feature Extern -empty-abi-descriptor -file-compilation-dir /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded -Xcc -fmodule-map-file=/home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Sources/_CJavaScriptKit/include/module.modulemap -Xcc -I -Xcc /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Sources/_CJavaScriptKit/include -Xcc -fmodule-map-file=/home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/checkouts/swift-dlmalloc/Sources/dlmalloc/include/module.modulemap -Xcc -I -Xcc /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/checkouts/swift-dlmalloc/Sources/dlmalloc/include -Xcc -fdeclspec -Xcc -g -no-auto-bridging-header-chaining -module-name EmbeddedApp -package-name embedded -in-process-plugin-server-path /home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/lib/swift/host/libSwiftInProcPluginServer.so -plugin-path /home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/lib/swift/host/plugins -plugin-path /home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/local/lib/swift/host/plugins -enable-default-cmo -num-threads 16 -o /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/EmbeddedApp.build/_thingsThatShouldNotBeNeeded.swift.o -o /home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Examples/Embedded/.build/wasm32-unknown-none-wasm/release/EmbeddedApp.build/main.swift.o
1. Swift version 6.3-dev (LLVM f87967b246b2aeb, Swift 8ea97f31e555540)
2. Compiling with effective version 5.10
3. While emitting IR SIL function "@$e13JavaScriptKit8JSObjectCyAA7JSValueOAA8JSSymbolCciM".
for <<debugloc at "/home/katei/ghq/github.com/swiftwasm/JavaScriptKit/Sources/JavaScriptKit/FundamentalObjects/JSObject.swift":179:12>> #0 0x0000555cfe543ba8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x8c5eba8)
#1 0x0000555cfe5416ce llvm::sys::RunSignalHandlers() (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x8c5c6ce)
#2 0x0000555cfe544241 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007f2425deb520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007f2425e3f9fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#5 0x00007f2425e3f9fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
#6 0x00007f2425e3f9fc pthread_kill ./nptl/pthread_kill.c:89:10
#7 0x00007f2425deb476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
#8 0x00007f2425dd17f3 abort ./stdlib/abort.c:81:7
#9 0x00007f2425dd171b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x00007f2425de2e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x0000555cfe195dd8 llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*>>, llvm::Twine const&) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x88b0dd8)
#12 0x0000555cf6956c72 llvm::CallInst::Create(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*>>, llvm::Twine const&, llvm::InsertPosition) crtstuff.c:0:0
#13 0x0000555cf6e2bb17 llvm::IRBuilderBase::CreateCall(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*>>, llvm::Twine const&, llvm::MDNode*) crtstuff.c:0:0
#14 0x0000555cf6e2b570 swift::irgen::IRBuilder::CreateCallOrInvoke(swift::irgen::FunctionPointer const&, llvm::ArrayRef<llvm::Value*>, llvm::BasicBlock*, llvm::BasicBlock*) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x1546570)
#15 0x0000555cf6e22be3 swift::irgen::IRBuilder::CreateCall(swift::irgen::FunctionPointer const&, llvm::ArrayRef<llvm::Value*>) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x153dbe3)
#16 0x0000555cf6f0a848 void llvm::function_ref<void (swift::irgen::IRGenFunction&)>::callback_fn<swift::irgen::getCoroFrameAllocStubFn(swift::irgen::IRGenModule&)::$_1>(long, swift::irgen::IRGenFunction&) GenFunc.cpp:0:0
#17 0x0000555cf6ea9384 swift::irgen::IRGenModule::getOrCreateHelperFunction(llvm::StringRef, llvm::Type*, llvm::ArrayRef<llvm::Type*>, llvm::function_ref<void (swift::irgen::IRGenFunction&)>, bool, bool, bool, swift::irgen::IRLinkage*, std::optional<unsigned int>, std::optional<llvm::function_ref<void (llvm::AttributeList&)>>) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x15c4384)
#18 0x0000555cf6ef80fd swift::irgen::getCoroFrameAllocStubFn(swift::irgen::IRGenModule&) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x16130fd)
#19 0x0000555cf6e35e44 swift::irgen::emitYieldOnceCoroutineEntry(swift::irgen::IRGenFunction&, swift::CanTypeWrapper<swift::SILFunctionType>, swift::irgen::NativeCCEntryPointArgumentEmission&) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x1550e44)
#20 0x0000555cf6ffad07 (anonymous namespace)::IRGenSILFunction::emitSILFunction() IRGenSIL.cpp:0:0
#21 0x0000555cf6ff96f5 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x17146f5)
#22 0x0000555cf6e9207b swift::irgen::IRGenerator::emitLazyDefinitions() (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x15ad07b)
#23 0x0000555cf6d0a122 swift::performIRGeneration(swift::ModuleDecl*, swift::IRGenOptions const&, swift::TBDGenOptions const&, std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule>>, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, llvm::GlobalVariable**) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0x1425122)
#24 0x0000555cf6856d4a generateIR(swift::IRGenOptions const&, swift::TBDGenOptions const&, std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule>>, swift::PrimarySpecificPaths const&, llvm::StringRef, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, llvm::GlobalVariable*&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>) FrontendTool.cpp:0:0
#25 0x0000555cf6850133 performCompileStepsPostSILGen(swift::CompilerInstance&, std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule>>, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) FrontendTool.cpp:0:0
#26 0x0000555cf684eedf swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0xf69edf)
#27 0x0000555cf68651da withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) FrontendTool.cpp:0:0
#28 0x0000555cf6854214 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) FrontendTool.cpp:0:0
#29 0x0000555cf6850ee1 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0xf6bee1)
#30 0x0000555cf65b5ec0 swift::mainEntry(int, char const**) (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0xcd0ec0)
#31 0x00007f2425dd2d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#32 0x00007f2425dd2e40 call_init ./csu/../csu/libc-start.c:128:20
#33 0x00007f2425dd2e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#34 0x0000555cf65b4f15 _start (/home/katei/.local/share/swiftly/toolchains/main-snapshot-2025-09-12/usr/bin/swift-frontend+0xccff15)
*** Signal 6: Backtracing from 0x7f2425ec788d... done ***
*** Program crashed: Aborted at 0x000003e800158011 ***
Platform: x86_64 Linux (Ubuntu 22.04.4 LTS)
Thread 0 "swift-frontend" crashed:
0 0x00007f2425ec788d syscall + 29 in libc.so.6
...
Registers:
rax 0x0000000000000000 0
rdx 0x0000000000000006 6
rcx 0x00007f2425ec788d 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 b5 0f 00 H=·ðÿÿs·ÃH··sµ··
rbx 0x0000000000000006 6
rsi 0x0000000000158011 1409041
rdi 0x0000000000158011 1409041
rbp 0x0000000000158011 1409041
rsp 0x0000555d08585428 6b 42 54 fe 5c 55 00 00 b0 56 58 08 5d 55 00 00 kBTþ\U··°VX·]U··
r8 0x0000555d085856b0 06 00 00 00 00 00 00 00 fa ff ff ff 00 00 00 00 ········úÿÿÿ····
r9 0x0000555d085856b0 06 00 00 00 00 00 00 00 fa ff ff ff 00 00 00 00 ········úÿÿÿ····
r10 0x0000555d085856b0 06 00 00 00 00 00 00 00 fa ff ff ff 00 00 00 00 ········úÿÿÿ····
r11 0x0000000000000246 582
r12 0x0000000000000000 0
r13 0x0000000000000000 0
r14 0x0000000000000000 0
r15 0x0000555d08585438 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ················
rip 0x00007f2425ec788d 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 b5 0f 00 H=·ðÿÿs·ÃH··sµ··
rflags 0x0000000000000246 ZF PF
cs 0x0033 fs 0x0000 gs 0x0000
Images (26 omitted):
0x00007f2425da9000–0x00007f2425f65341 d5197096f709801829b118af1b7cf6631efa2dcd libc.so.6 /usr/lib/x86_64-linux-gnu/libc.so.6
Backtrace took 0.01s
error: Plugin ended with exit code 1
Metadata
Metadata
Assignees
Labels
No labels