-
Notifications
You must be signed in to change notification settings - Fork 30
The test executable fails to run due to call stack exhausted (swift-wasm-DEVELOPMENT-SNAPSHOT-2024-03-22-a) #5573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for detailed reproduction! Between the two snapshots, we introduced significant changes to XCTest to make the change acceptable for the upstream and the change includes how partial async jobs chains during the tests. For such large scale test suites, we will recommend using tail-call enabled SDK after #5568 will be resolved. For now, please extend stack size of wasmtime engine and C stack size in wasm binary: # Extend stack size to 1mb
$ swift build -c release --build-tests --experimental-swift-sdk DEVELOPMENT-SNAPSHOT-2024-03-22-a-wasm -Xlinker -z -Xlinker stack-size=1048576
# 512kb (default) -> 1mb
$ wasmtime --wasm max-wasm-stack=1048576 --dir=/ .build/release/WasmTestExamplePackageTests.wasm |
Thank you for providing a workaround. Unfortunately, I had already tried such an approach before I created the issue, but the result was the same. I gave up when I increased the size in stages up to 100 MB. |
Oops, I overlooked |
@KKK669 Note that you need to increase the size of both wasmtime stack size and C stack size just in case. |
This is a workaround for swiftwasm/swift#5573.
Thank you so much! The 16 MiB of stack is quite large, but the test is finally working again. I'll go with it until tail-call is ready. https://github.com/kkk669/swift-syntax/actions/runs/8437995545/job/23109088958 |
Description
Some test executables fail with the "call stack exhausted" error.
What they have in common:
Reproduction
async
)Expected behavior
I expected the test executable to succeed in running.
In fact, the executable built with the previous (swift-wasm-DEVELOPMENT-SNAPSHOT-2024-03-20-a) toolchain has succeeded.
Environment
The text was updated successfully, but these errors were encountered: