swiftwasm / swift

WebAssembly support for the Swift programming language
https://swiftwasm.org
1.28k stars 28 forks source link

Compiler started crashing while building our XCTest #5558

Closed kateinoigakukun closed 7 months ago

kateinoigakukun commented 8 months ago

The compiler crashing while lowering a piece of code that appears only on our fork. Our actions would be:

  1. Change the forked XCTest code not to crash compiler
  2. Fix compiler not to crash

This crash started from swift-DEVELOPMENT-SNAPSHOT-2023-10-28-a, so there should be something wrong between https://github.com/apple/swift/compare/swift-DEVELOPMENT-SNAPSHOT-2023-10-27-a...swift-DEVELOPMENT-SNAPSHOT-2023-10-28-a

Crash logs: https://github.com/swiftwasm/swiftwasm-build/actions/runs/6723389038/job/18273372555

swift-frontend: /home/build-user/swift/lib/SIL/IR/SILArgument.cpp:89: swift::SILArgumentConvention swift::SILFunctionConventions::getSILArgumentConvention(unsigned int) const: Assertion `index < getNumSILArguments()' failed.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.  Program arguments: /home/build-user/build/Packaging/base-snapshot/usr/bin/swift-frontend -frontend -c /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/TestListing.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/XCTestCaseSuite.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/TestFiltering.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/XCTestInternalObservation.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/ObjectWrapper.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/PrintObserver.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/ArgumentParser.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/SourceLocation.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/WaiterManager.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/IgnoredErrors.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/PerformanceMeter.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/WallClockTimeMetric.swift -primary-file /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/Shims.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestCase+Performance.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/CodableObserver.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestRun.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestMain.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestCase.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestSuite.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestSuiteRun.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestErrors.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestObservation.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestCaseRun.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCAbstractTest.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTestObservationCenter.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTAssert.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/XCTSkip.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/Asynchronous/XCTWaiter+Validation.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift /home/build-user/swift-corelibs-xctest/Sources/XCTest/Public/Asynchronous/XCTestExpectation.swift -emit-module-path CMakeFiles/XCTest.dir/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift.swiftmodule -emit-module-doc-path CMakeFiles/XCTest.dir/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift.swiftdoc -emit-module-source-info-path CMakeFiles/XCTest.dir/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift.swiftsourceinfo -emit-dependencies-path CMakeFiles/XCTest.dir/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift.obj.d -emit-reference-dependencies-path CMakeFiles/XCTest.dir/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift.obj.swiftdeps -target wasm32-unknown-wasi -disable-objc-interop -sdk /home/build-user/build-sdk/wasi-sysroot -I /home/build-user/build/Packaging/target-toolchain/usr/lib/swift_static/wasi/wasm32 -module-link-name XCTest -resource-dir /home/build-user/build/Packaging/target-toolchain/usr/lib/swift_static -static -O -D USE_SWIFT_CONCURRENCY_WAITER -parse-as-library -module-name XCTest -o CMakeFiles/XCTest.dir/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift.obj
1.  Swift version 5.11-dev (LLVM 26ea15ae72ba6e9, Swift 7e4fa781ea27c47)
4.  Compiling with the current language version
5.  While evaluating request ASTLoweringRequest(Lowering AST to SIL for file "/home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift")
6.  While silgen emitFunction SIL function "@$s6XCTest0A4CaseC19TeardownBlocksStateC11appendAsyncyyyyYaYbKcF".
 for 'appendAsync(_:)' (at /home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift:23:9)
7.  While silgen closureexpr SIL function "@$s6XCTest0A4CaseC19TeardownBlocksStateC11appendAsyncyyyyYaYbKcFyyXEfU_".
 for expression at [/home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift:24:43 - line:29:13] RangeText="{
                precondition(wasFinalized == false, "API violation -- attempting to add a teardown block after teardown blocks have been dequeued")
                blocks.append {
                    try await awaitUsingExpectation { try await block() }
                }
            "
8.  While silgen closureexpr SIL function "@$s6XCTest0A4CaseC19TeardownBlocksStateC11appendAsyncyyyyYaYbKcFyyXEfU_yyYaKcfU_".
 for expression at [/home/build-user/swift-corelibs-xctest/Sources/XCTest/Private/XCTestCase.TearDownBlocksState.swift:26:31 - line:28:17] RangeText="{
                    try await awaitUsingExpectation { try await block() }
                "
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  0x0000559bda792597
1  swift-frontend  0x0000559bda7902ee
2  swift-frontend  0x0000559bda792c2f
3  libpthread.so.0 0x00007feec174b980
4  libc.so.6       0x00007feebec49e87 gsignal + 199
5  libc.so.6       0x00007feebec4b7f1 abort + 321
6  libc.so.6       0x00007feebec3b3fa
7  libc.so.6       0x00007feebec3b472
8  swift-frontend  0x0000559bd4cc50c3
9  swift-frontend  0x0000559bd4cc7b73
10 swift-frontend  0x0000559bd443e7e3
11 swift-frontend  0x0000559bd43dc02e
12 swift-frontend  0x0000559bd435fee8
13 swift-frontend  0x0000559bd4362d7c
14 swift-frontend  0x0000559bd43cf204
15 swift-frontend  0x0000559bd43bb51b
16 swift-frontend  0x0000559bd43af8ac
17 swift-frontend  0x0000559bd438f28c
18 swift-frontend  0x0000559bd4460bc7
19 swift-frontend  0x0000559bd44615de
20 swift-frontend  0x0000559bd44612df
21 swift-frontend  0x0000559bd4492464
22 swift-frontend  0x0000559bd447e95c
23 swift-frontend  0x0000559bd4490eab
24 swift-frontend  0x0000559bd449ee08
25 swift-frontend  0x0000559bd449e471
26 swift-frontend  0x0000559bd448304a
27 swift-frontend  0x0000559bd4480acd
28 swift-frontend  0x0000559bd43bb4e4
29 swift-frontend  0x0000559bd43b0071
30 swift-frontend  0x0000559bd4449b7f
31 swift-frontend  0x0000559bd444815d
32 swift-frontend  0x0000559bd43dc14d
33 swift-frontend  0x0000559bd435fee8
34 swift-frontend  0x0000559bd4362d7c
35 swift-frontend  0x0000559bd43cf204
36 swift-frontend  0x0000559bd43bb51b
37 swift-frontend  0x0000559bd43af8ac
38 swift-frontend  0x0000559bd438f28c
39 swift-frontend  0x0000559bd4460bc7
40 swift-frontend  0x0000559bd4492a55
41 swift-frontend  0x0000559bd447e95c
42 swift-frontend  0x0000559bd4490eab
43 swift-frontend  0x0000559bd449ee08
44 swift-frontend  0x0000559bd449e471
45 swift-frontend  0x0000559bd448304a
46 swift-frontend  0x0000559bd4480acd
47 swift-frontend  0x0000559bd43bb4e4
48 swift-frontend  0x0000559bd43b0071
49 swift-frontend  0x0000559bd4449b7f
50 swift-frontend  0x0000559bd444815d
51 swift-frontend  0x0000559bd43dbc67
52 swift-frontend  0x0000559bd4360b0c
53 swift-frontend  0x0000559bd4361c8c
54 swift-frontend  0x0000559bd435ef5d
55 swift-frontend  0x0000559bd445dde2
56 swift-frontend  0x0000559bd445a2f4
57 swift-frontend  0x0000559bd445f0e4
58 swift-frontend  0x0000559bd445ac29
59 swift-frontend  0x0000559bd445abbd
60 swift-frontend  0x0000559bd4364e0f
61 swift-frontend  0x0000559bd4447aa4
62 swift-frontend  0x0000559bd43680a3
63 swift-frontend  0x0000559bd4365c8b
64 swift-frontend  0x0000559bd3c0bdab
65 swift-frontend  0x0000559bd3c21ff9
66 swift-frontend  0x0000559bd3c0f813
67 swift-frontend  0x0000559bd3c0e054
68 swift-frontend  0x0000559bd39caad0
69 libc.so.6       0x00007feebec2cc87 __libc_start_main + 231
70 swift-frontend  0x0000559bd39c94aa
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal 6 (use -v to see invocation)
ninja: build stopped: subcommand failed.
kateinoigakukun commented 7 months ago
* thread #1, name = 'swift-frontend', stop reason = hit program assert
    frame #4: 0x00005555572eb643 swift-frontend`swift::SILFunctionConventions::getSILArgumentConvention(this=<unavailable>, index=<unavailable>) const at SILArgument.cpp:89:3
   86
   87   SILArgumentConvention
   88   SILFunctionConventions::getSILArgumentConvention(unsigned index) const {
-> 89     assert(index < getNumSILArguments());
   90
   91     auto numIndirectResults = getNumIndirectSILResults()
   92       + getNumIndirectSILErrorResults();
Target 0: (swift-frontend) stopped.
(lldb) bt
error: swift-frontend GetDIE for DIE 0x3a is outside of its CU 0x4c51c7
* thread #1, name = 'swift-frontend', stop reason = hit program assert
    frame #0: 0x00007ffff5e2600b libc.so.6`raise + 203
    frame #1: 0x00007ffff5e05859 libc.so.6`abort + 299
    frame #2: 0x00007ffff5e05729 libc.so.6`___lldb_unnamed_symbol2384 + 15
    frame #3: 0x00007ffff5e16fd6 libc.so.6`__assert_fail + 70
  * frame #4: 0x00005555572eb643 swift-frontend`swift::SILFunctionConventions::getSILArgumentConvention(this=<unavailable>, index=<unavailable>) const at SILArgument.cpp:89:3
    frame #5: 0x00005555572ee193 swift-frontend`swift::SILBasicBlock::createFunctionArgument(this=0x0000555561604e98, Ty=SILType @ r15, D=0x00005555614a2830, disableEntryBlockVerification=<unavailable>) at SILBasicBlock.cpp:164:32
    frame #6: 0x0000555556a7c93d swift-frontend`swift::Lowering::SILGenFunction::emitProlog(swift::DeclContext*, swift::CaptureInfo, swift::ParameterList*, swift::ParamDecl*, swift::Type, std::optional<swift::Type>, swift::SourceLoc, std::optional<swift::Lowering::AbstractionPattern>) at SILGenProlog.cpp:1086:33
    frame #7: 0x0000555556a7c906 swift-frontend`swift::Lowering::SILGenFunction::emitProlog(this=0x00007fffffff14b0, DC=0x00005555614a2e58, captureInfo=<unavailable>, paramList=0x00005555614a3230, selfParam=0x0000000000000000, resultType=<unavailable>, errorType= Has Value=true , throwsLoc=<unavailable>, origClosureType= Has Value=true ) at SILGenProlog.cpp:1264:5
    frame #8: 0x0000555556a1c556 swift-frontend`swift::Lowering::SILGenFunction::emitClosure(this=0x00007fffffff14b0, ace=<unavailable>) at SILGenFunction.cpp:1084:3
    frame #9: 0x00005555569a02e8 swift-frontend`swift::Lowering::SILGenModule::emitFunctionDefinition(this=<unavailable>, constant=SILDeclRef @ 0x00007fffffff1e60, f=0x0000555561604ca8) at SILGen.cpp:928:37
    frame #10: 0x00005555569a31fc swift-frontend`swift::Lowering::SILGenModule::emitClosure(this=0x00007fffffff7ee8, ce=0x00005555614a2e58) at SILGen.cpp:1505:3
    frame #11: 0x0000555556a0f7a4 swift-frontend`(anonymous namespace)::RValueEmitter::visitAbstractClosureExpr(this=0x00007fffffff1fc0, e=0x00005555614a2e58, C=<unavailable>) at SILGenExpr.cpp:2778:11
    frame #12: 0x00005555569fba9b swift-frontend`swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(this=<unavailable>, E=<unavailable>, AA=<unavailable>) at ExprNodes.def:0
    frame #13: 0x00005555569f000c swift-frontend`swift::Lowering::SILGenFunction::emitRValueAsSingleValue(swift::Expr*, swift::Lowering::SGFContext) [inlined] swift::Lowering::SILGenFunction::emitRValue(this=<unavailable>, E=0x00005555614a2e60, C=<unavailable>) at SILGenExpr.cpp:6428:31
    frame #14: 0x00005555569effd0 swift-frontend`swift::Lowering::SILGenFunction::emitRValueAsSingleValue(this=0x00007fffffff4250, E=0x00005555614a2e60, C=<unavailable>) at SILGenExpr.cpp:6559:10
    frame #15: 0x00005555569cfafc swift-frontend`swift::Lowering::SILGenFunction::emitConvertedRValue(swift::SILLocation, swift::Lowering::Conversion const&, swift::Lowering::SGFContext, llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::SGFContext)>) [inlined] llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::SGFContext)>::operator(this=<unavailable>, params=0x00007fffffff4250, params=SILLocation @ 0x000000000b093250, params=SGFContext @ scalar)(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::SGFContext) const at STLFunctionalExtras.h:68:12
    frame #16: 0x00005555569cfae1 swift-frontend`swift::Lowering::SILGenFunction::emitConvertedRValue(this=0x00007fffffff4250, loc=SILLocation @ 0x000000000ad98a90, conversion=<unavailable>, C=<unavailable>, produceValue=swift::Lowering::ValueProducerRef @ 0x00007fffffff20f0)>) at SILGenConvert.cpp:1050:17
    frame #17: 0x0000555556a9f547 swift-frontend`swift::Lowering::ArgumentSource::getConverted(this=0x0000555561624870, SGF=0x00007fffffff4250, conversion=0x00007fffffff21a8, C=SGFContext @ r14) && at ArgumentSource.cpp:99:16
    frame #18: 0x0000555556a9ff4e swift-frontend`swift::Lowering::ArgumentSource::forwardInto(swift::Lowering::SILGenFunction&, swift::Lowering::AbstractionPattern, swift::Lowering::Initialization*, swift::Lowering::TypeLowering const&) && [inlined] swift::Lowering::ArgumentSource::getAsSingleValue(this=0x0000555561624870, SGF=0x00007fffffff4250, origFormalType=AbstractionPattern @ 0x00007fffffff2180, loweredTy=SILType @ rbx, C=SGFContext @ rbp) && at ArgumentSource.cpp:86:27
    frame #19: 0x0000555556a9fee4 swift-frontend`swift::Lowering::ArgumentSource::forwardInto(this=0x0000555561624870, SGF=0x00007fffffff4250, origFormalType=AbstractionPattern @ 0x00007fffffff2220, dest=0x0000555561516ec0, destTL=0x0000555561609b30) && at ArgumentSource.cpp:213:24
    frame #20: 0x0000555556a9fc4f swift-frontend`swift::Lowering::ArgumentSource::materialize(this=0x0000555561624870, SGF=<unavailable>, origFormalType=AbstractionPattern @ 0x00007fffffff2280, destType=<unavailable>) && at ArgumentSource.cpp:189:20
    frame #21: 0x0000555556ad1782 swift-frontend`(anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern, std::optional<swift::AnyFunctionType::Param>) [inlined] (anonymous namespace)::ArgEmitter::emitIndirect(this=<unavailable>, arg=0x0000555561624870, loweredSubstArgType=<unavailable>, origParamType=AbstractionPattern @ 0x00007fffffff22c0, param=<unavailable>) at SILGenApply.cpp:3551:31
    frame #22: 0x0000555556ad16aa swift-frontend`(anonymous namespace)::ArgEmitter::emit(this=<unavailable>, arg=0x0000555561624870, origParamType=AbstractionPattern @ 0x00007fffffff2450, origParam= Has Value=true ) at SILGenApply.cpp:3407:7
    frame #23: 0x0000555556abd926 swift-frontend`(anonymous namespace)::ArgEmitter::emitSingleArg(this=0x00007fffffff2728, arg=0x0000555561624870, origParamType=AbstractionPattern @ 0x00007fffffff2540, param= Has Value=true ) at SILGenApply.cpp:3275:5
    frame #24: 0x0000555556ad0225 swift-frontend`(anonymous namespace)::ArgEmitter::emitPreparedArgs(this=<unavailable>, args=0x0000555561558c98, origFormalType=AbstractionPattern @ 0x00007fffffff2640) at SILGenApply.cpp:3300:9
    frame #25: 0x0000555556addc1f swift-frontend`(anonymous namespace)::CallSite::emit(this=<unavailable>, SGF=0x00007fffffff4250, origFormalType=AbstractionPattern @ 0x00007fffffff27c0, substFnType=<unavailable>, lowering=<unavailable>, args=0x00007fffffff2988, delayedArgs=0x00007fffffff29d8, foreign=<unavailable>)::ParamLowering&, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, swift::ForeignInfo const&) && at SILGenApply.cpp:4666:13
    frame #26: 0x0000555556add1ce swift-frontend`(anonymous namespace)::CallEmission::emitArgumentsForNormalApply(this=<unavailable>, origFormalType=AbstractionPattern @ 0x00007fffffff2b30, substFnType=<unavailable>, foreign=<unavailable>, uncurriedArgs=<unavailable>, uncurriedLoc=<unavailable>) at SILGenApply.cpp:5249:26
    frame #27: 0x0000555556ac2225 swift-frontend`(anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) [inlined] (anonymous namespace)::CallEmission::applyNormalCall(this=0x00007fffffff3450, C=<unavailable>) at SILGenApply.cpp:4977:26
    frame #28: 0x0000555556ac1dce swift-frontend`(anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) [inlined] (anonymous namespace)::CallEmission::applyFirstLevelCallee(this=0x00007fffffff3450, C=<unavailable>) at SILGenApply.cpp:4924:10
    frame #29: 0x0000555556ac197b swift-frontend`(anonymous namespace)::CallEmission::apply(this=0x00007fffffff3450, C=<unavailable>) at SILGenApply.cpp:4769:18
    frame #30: 0x0000555556abfb5d swift-frontend`swift::Lowering::SILGenFunction::emitApplyExpr(this=0x00007fffffff4250, e=0x00005555614a32b0, c=SGFContext @ 0x00007fffffff31f0) at SILGenApply.cpp:5932:19
    frame #31: 0x00005555569fba64 swift-frontend`swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(this=<unavailable>, E=<unavailable>, AA=<unavailable>) at ExprNodes.def:0
    frame #32: 0x00005555569f07d1 swift-frontend`swift::Lowering::SILGenFunction::emitIgnoredExpr(swift::Expr*) [inlined] swift::Lowering::SILGenFunction::emitRValue(this=0x00007fffffff4250, E=0x00005555614a32b0, C=SGFContext @ scalar) at SILGenExpr.cpp:6428:31
    frame #33: 0x00005555569f079a swift-frontend`swift::Lowering::SILGenFunction::emitIgnoredExpr(this=0x00007fffffff4250, E=0x00005555614a32b0) at SILGenExpr.cpp:6553:3
    frame #34: 0x0000555556a879df swift-frontend`swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) at SILGenStmt.cpp:422:11
    frame #35: 0x0000555556a878d4 swift-frontend`swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(this=0x00007fffffff3e60, S=0x00005555614a3320) at StmtNodes.def:47:1
    frame #36: 0x0000555556a8640d swift-frontend`swift::Lowering::SILGenFunction::emitStmt(this=<unavailable>, S=<unavailable>) at SILGenStmt.cpp:207:22
    frame #37: 0x0000555556a1c621 swift-frontend`swift::Lowering::SILGenFunction::emitClosure(this=0x00007fffffff4250, ace=0x00005555614a2b30) at SILGenFunction.cpp:1091:5
    frame #38: 0x00005555569a02e8 swift-frontend`swift::Lowering::SILGenModule::emitFunctionDefinition(this=<unavailable>, constant=SILDeclRef @ 0x00007fffffff4c00, f=0x00005555618a6068) at SILGen.cpp:928:37
    frame #39: 0x00005555569a31fc swift-frontend`swift::Lowering::SILGenModule::emitClosure(this=0x00007fffffff7ee8, ce=0x00005555614a2b30) at SILGen.cpp:1505:3
    frame #40: 0x0000555556a0f7a4 swift-frontend`(anonymous namespace)::RValueEmitter::visitAbstractClosureExpr(this=0x00007fffffff4d60, e=0x00005555614a2b30, C=<unavailable>) at SILGenExpr.cpp:2778:11
    frame #41: 0x00005555569fba9b swift-frontend`swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(this=<unavailable>, E=<unavailable>, AA=<unavailable>) at ExprNodes.def:0
    frame #42: 0x00005555569f000c swift-frontend`swift::Lowering::SILGenFunction::emitRValueAsSingleValue(swift::Expr*, swift::Lowering::SGFContext) [inlined] swift::Lowering::SILGenFunction::emitRValue(this=<unavailable>, E=0x00005555614a2b38, C=<unavailable>) at SILGenExpr.cpp:6428:31
    frame #43: 0x00005555569effd0 swift-frontend`swift::Lowering::SILGenFunction::emitRValueAsSingleValue(this=0x00007fffffff6e80, E=0x00005555614a2b38, C=<unavailable>) at SILGenExpr.cpp:6559:10
    frame #44: 0x00005555569cfafc swift-frontend`swift::Lowering::SILGenFunction::emitConvertedRValue(swift::SILLocation, swift::Lowering::Conversion const&, swift::Lowering::SGFContext, llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::SGFContext)>) [inlined] llvm::function_ref<swift::Lowering::ManagedValue (swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::SGFContext)>::operator(this=<unavailable>, params=0x00007fffffff6e80, params=SILLocation @ 0x000000000d796a10, params=SGFContext @ scalar)(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Lowering::SGFContext) const at STLFunctionalExtras.h:68:12
    frame #45: 0x00005555569cfae1 swift-frontend`swift::Lowering::SILGenFunction::emitConvertedRValue(this=0x00007fffffff6e80, loc=SILLocation @ 0x000000000d79a210, conversion=<unavailable>, C=<unavailable>, produceValue=swift::Lowering::ValueProducerRef @ 0x00007fffffff4e90)>) at SILGenConvert.cpp:1050:17
    frame #46: 0x0000555556a9f547 swift-frontend`swift::Lowering::ArgumentSource::getConverted(this=<unavailable>, SGF=0x00007fffffff6e80, conversion=0x00007fffffff4f28, C=SGFContext @ r14) && at ArgumentSource.cpp:99:16
    frame #47: 0x0000555556ad1d6f swift-frontend`(anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern, std::optional<swift::AnyFunctionType::Param>) [inlined] (anonymous namespace)::ArgEmitter::emitConvertedArgument(this=0x00007fffffff5338, arg=0x0000555561892f40, conversion=Conversion @ 0x00007fffffff4f28, C=<unavailable>) at SILGenApply.cpp:4195:34
    frame #48: 0x0000555556ad1cf5 swift-frontend`(anonymous namespace)::ArgEmitter::emit(swift::Lowering::ArgumentSource&&, swift::Lowering::AbstractionPattern, std::optional<swift::AnyFunctionType::Param>) at SILGenApply.cpp:3754:15
    frame #49: 0x0000555556ad1c74 swift-frontend`(anonymous namespace)::ArgEmitter::emit(this=0x00007fffffff5338, arg=0x0000555561892f40, origParamType=AbstractionPattern @ 0x00007fffffff5090, origParam= Has Value=true ) at SILGenApply.cpp:3413:5
    frame #50: 0x0000555556abd926 swift-frontend`(anonymous namespace)::ArgEmitter::emitSingleArg(this=0x00007fffffff5338, arg=0x0000555561892f40, origParamType=AbstractionPattern @ 0x00007fffffff5150, param= Has Value=true ) at SILGenApply.cpp:3275:5
    frame #51: 0x0000555556ad0225 swift-frontend`(anonymous namespace)::ArgEmitter::emitPreparedArgs(this=<unavailable>, args=0x0000555561558c98, origFormalType=AbstractionPattern @ 0x00007fffffff5250) at SILGenApply.cpp:3300:9
    frame #52: 0x0000555556addc1f swift-frontend`(anonymous namespace)::CallSite::emit(this=<unavailable>, SGF=0x00007fffffff6e80, origFormalType=AbstractionPattern @ 0x00007fffffff53d0, substFnType=<unavailable>, lowering=<unavailable>, args=0x00007fffffff5598, delayedArgs=0x00007fffffff55e8, foreign=<unavailable>)::ParamLowering&, llvm::SmallVectorImpl<swift::Lowering::ManagedValue>&, llvm::SmallVectorImpl<(anonymous namespace)::DelayedArgument>&, swift::ForeignInfo const&) && at SILGenApply.cpp:4666:13
    frame #53: 0x0000555556add1ce swift-frontend`(anonymous namespace)::CallEmission::emitArgumentsForNormalApply(this=<unavailable>, origFormalType=AbstractionPattern @ 0x00007fffffff5740, substFnType=<unavailable>, foreign=<unavailable>, uncurriedArgs=<unavailable>, uncurriedLoc=<unavailable>) at SILGenApply.cpp:5249:26
    frame #54: 0x0000555556ac2225 swift-frontend`(anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) [inlined] (anonymous namespace)::CallEmission::applyNormalCall(this=0x00007fffffff6060, C=<unavailable>) at SILGenApply.cpp:4977:26
    frame #55: 0x0000555556ac1dce swift-frontend`(anonymous namespace)::CallEmission::apply(swift::Lowering::SGFContext) [inlined] (anonymous namespace)::CallEmission::applyFirstLevelCallee(this=0x00007fffffff6060, C=<unavailable>) at SILGenApply.cpp:4924:10
    frame #56: 0x0000555556ac197b swift-frontend`(anonymous namespace)::CallEmission::apply(this=0x00007fffffff6060, C=<unavailable>) at SILGenApply.cpp:4769:18
    frame #57: 0x0000555556abfb5d swift-frontend`swift::Lowering::SILGenFunction::emitApplyExpr(this=0x00007fffffff6e80, e=0x00005555614a3370, c=SGFContext @ 0x00007fffffff5e00) at SILGenApply.cpp:5932:19
    frame #58: 0x00005555569fba64 swift-frontend`swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(this=<unavailable>, E=<unavailable>, AA=<unavailable>) at ExprNodes.def:0
    frame #59: 0x00005555569f07d1 swift-frontend`swift::Lowering::SILGenFunction::emitIgnoredExpr(swift::Expr*) [inlined] swift::Lowering::SILGenFunction::emitRValue(this=0x00007fffffff6e80, E=0x00005555614a3370, C=SGFContext @ scalar) at SILGenExpr.cpp:6428:31
    frame #60: 0x00005555569f079a swift-frontend`swift::Lowering::SILGenFunction::emitIgnoredExpr(this=0x00007fffffff6e80, E=0x00005555614a3370) at SILGenExpr.cpp:6553:3
    frame #61: 0x0000555556a879df swift-frontend`swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(swift::Stmt*) at SILGenStmt.cpp:422:11
    frame #62: 0x0000555556a878d4 swift-frontend`swift::ASTVisitor<(anonymous namespace)::StmtEmitter, void, void, void, void, void, void>::visit(this=0x00007fffffff6a70, S=0x00005555614a33c8) at StmtNodes.def:47:1
    frame #63: 0x0000555556a8640d swift-frontend`swift::Lowering::SILGenFunction::emitStmt(this=<unavailable>, S=<unavailable>) at SILGenStmt.cpp:207:22
    frame #64: 0x0000555556a1c215 swift-frontend`swift::Lowering::SILGenFunction::emitFunction(this=0x00007fffffff6e80, fd=0x00005555614a2910) at SILGenFunction.cpp:1066:5
    frame #65: 0x00005555569a0f0c swift-frontend`swift::Lowering::SILGenModule::emitFunctionDefinition(this=<unavailable>, constant=SILDeclRef @ 0x00007fffffff7830, f=0x000055556188a160) at SILGen.cpp:948:35
    frame #66: 0x00005555569a208c swift-frontend`swift::Lowering::SILGenModule::emitOrDelayFunction(this=0x00007fffffff7ee8, constant=SILDeclRef @ 0x00007fffffff78c0) at SILGen.cpp:0
    frame #67: 0x000055555699f35d swift-frontend`swift::Lowering::SILGenModule::emitFunction(this=0x00007fffffff7ee8, fd=0x00005555614a2910) at SILGen.cpp:1446:5
    frame #68: 0x0000555556a9c6a2 swift-frontend`(anonymous namespace)::SILGenType::visitFuncDecl(this=0x00007fffffff7d50, fd=<unavailable>) at SILGenType.cpp:1163:9
    frame #69: 0x0000555556a98944 swift-frontend`(anonymous namespace)::SILGenType::emitType() [inlined] swift::ASTVisitor<(anonymous namespace)::SILGenType, void, void, void, void, void, void>::visit(this=0x00007fffffff7d50, D=<unavailable>) at ASTVisitor.h:0:5
    frame #70: 0x0000555556a98905 swift-frontend`(anonymous namespace)::SILGenType::emitType() [inlined] (anonymous namespace)::SILGenType::visit(this=0x00007fffffff7d50, D=<unavailable>) at SILGenType.cpp:1150:24
    frame #71: 0x0000555556a988f6 swift-frontend`(anonymous namespace)::SILGenType::emitType(this=0x00007fffffff7d50) at SILGenType.cpp:1105:7
    frame #72: 0x0000555556a9d9f4 swift-frontend`swift::ASTVisitor<SILGenExtension, void, void, void, void, void, void>::visit(this=0x00007fffffff7de0, D=<unavailable>) at ASTVisitor.h:0:5
    frame #73: 0x0000555556a99279 swift-frontend`SILGenExtension::emitExtension(swift::ExtensionDecl*) [inlined] SILGenExtension::visit(this=0x00007fffffff7de0, D=0x00005555614a1e68) at SILGenType.cpp:1310:24
    frame #74: 0x0000555556a9925e swift-frontend`SILGenExtension::emitExtension(this=0x00007fffffff7de0, e=0x00005555614a1d10) at SILGenType.cpp:1281:7
    frame #75: 0x0000555556a9920d swift-frontend`swift::Lowering::SILGenModule::visitExtensionDecl(this=<unavailable>, ed=<unavailable>) at SILGenType.cpp:1440:26
    frame #76: 0x00005555569a528f swift-frontend`swift::ASTLoweringRequest::evaluate(swift::Evaluator&, swift::ASTLoweringDescriptor) const [inlined] swift::Lowering::SILGenModule::visit(this=0x00007fffffff7ee8, D=0x00005555614a1d30) at SILGen.cpp:832:15
    frame #77: 0x00005555569a526c swift-frontend`swift::ASTLoweringRequest::evaluate(swift::Evaluator&, swift::ASTLoweringDescriptor) const at SILGen.cpp:2000:11
    frame #78: 0x00005555569a5176 swift-frontend`swift::ASTLoweringRequest::evaluate(this=<unavailable>, evaluator=<unavailable>, desc=ASTLoweringDescriptor @ 0x00007fffffff84d8) const at SILGen.cpp:2138:13
    frame #79: 0x0000555556a85d34 swift-frontend`swift::SimpleRequest<swift::ASTLoweringRequest, std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule> > (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::ASTLoweringRequest const&, swift::Evaluator&) [inlined] std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule> > swift::SimpleRequest<swift::ASTLoweringRequest, std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule> > (this=0x00007fffffff86c0, evaluator=<unavailable>, (null)=<unavailable>), (swift::RequestFlags)9>::callDerived<0ul>(swift::Evaluator&, std::integer_sequence<unsigned long, 0ul>) const at SimpleRequest.h:267:24
    frame #80: 0x0000555556a85cc2 swift-frontend`swift::SimpleRequest<swift::ASTLoweringRequest, std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule> > (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::evaluateRequest(request=0x00007fffffff86c0, evaluator=0x0000555561038720) at SimpleRequest.h:290:20
    frame #81: 0x00005555569a8638 swift-frontend`llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::getResultUncached<swift::ASTLoweringRequest>(this=0x0000555561038720, request=0x00007fffffff86c0) at Evaluator.h:368:21
    frame #82: 0x00005555569a610b swift-frontend`swift::performASTLowering(swift::FileUnit&, swift::Lowering::TypeConverter&, swift::SILOptions const&, swift::IRGenOptions const*) [inlined] llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::operator(this=<unavailable>, request=0x00007fffffff86c0)<swift::ASTLoweringRequest, (void*)0>(swift::ASTLoweringRequest const&) at Evaluator.h:273:12
    frame #83: 0x00005555569a6103 swift-frontend`swift::performASTLowering(sf=0x00005555611c8850, tc=<unavailable>, options=0x00007fffffff8798, irgenOptions=0x00007fffffff8b48) at SILGen.cpp:2183:25
    frame #84: 0x000055555627160b swift-frontend`swift::performCompileStepsPostSema(Instance=0x0000555561002bc0, ReturnValue=0x00007fffffff9494, observer=0x0000000000000000) at FrontendTool.cpp:887:17
    frame #85: 0x0000555556288771 swift-frontend`bool llvm::function_ref<bool (swift::CompilerInstance&)>::callback_fn<performAction(swift::CompilerInstance&, int&, swift::FrontendObserver*)::$_30>(long, swift::CompilerInstance&) [inlined] performAction(this=<unavailable>, Instance=<unavailable>)::$_30::operator()(swift::CompilerInstance&) const at FrontendTool.cpp:1423:18 [artificial]
    frame #86: 0x0000555556287d99 swift-frontend`withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) [inlined] llvm::function_ref<bool (swift::CompilerInstance&)>::operator(this=<unavailable>, params=0x0000555561002bc0)(swift::CompilerInstance&) const at STLFunctionalExtras.h:68:12
    frame #87: 0x0000555556287d90 swift-frontend`withSemanticAnalysis(Instance=0x0000555561002bc0, observer=<unavailable>, cont=function_ref<bool (swift::CompilerInstance &)> @ 0x000000000d8c8100, runDespiteErrors=<unavailable>)>, bool) at FrontendTool.cpp:1283:10
    frame #88: 0x0000555556275203 swift-frontend`performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) [inlined] performAction(Instance=0x0000555561002bc0, ReturnValue=0x00007fffffff9494, observer=0x0000000000000000) at FrontendTool.cpp:0:12
    frame #89: 0x000055555627519e swift-frontend`performCompile(Instance=0x0000555561002bc0, ReturnValue=0x00007fffffff9494, observer=0x0000000000000000) at FrontendTool.cpp:1494:19
    frame #90: 0x000055555627387d swift-frontend`swift::performFrontend(Args=ArrayRef<const char *> @ 0x00007fffffff9498, Argv0=<unavailable>, MainAddr=<unavailable>, observer=0x0000000000000000) at FrontendTool.cpp:2452:19
    frame #91: 0x000055555603058a swift-frontend`swift::mainEntry(int, char const**) at driver.cpp:0
    frame #92: 0x0000555556030222 swift-frontend`swift::mainEntry(argc_=<unavailable>, argv_=0x00007fffffffd038) at driver.cpp:498:10
    frame #93: 0x00007ffff5e07083 libc.so.6`__libc_start_main + 243
    frame #94: 0x000055555602f5ee swift-frontend`_start + 46
kateinoigakukun commented 7 months ago

Hotfixed by https://github.com/swiftwasm/swiftwasm-build/pull/106