This repository was archived by the owner on Nov 10, 2026. It is now read-only.
Repository navigation
Give the Linux skip binary 8 MiB thread stacks - #290
Merged
Merged
Conversation
The static Linux SDK links musl, which gives every thread but the main one a 128 KiB stack. SwiftParser recurses per nesting level, and transpiling SkipUI overflows that on a DispatchWorker thread: skipstone exits with SIGSEGV (139) and no message. musl takes its default thread stack size from PT_GNU_STACK, so set it at link time to 8 MiB, glibc's usual default and musl's maximum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Lets SkipUI-based packages build for Android on Linux, about 3× faster than on Intel macOS (table below). One step of skiptools/actions#23: skip-ui and skip-fuse-ui run their emulator tests only on Intel, and this removes the first blocker to running them on Linux (the second is listed under Side effects).
On Linux, transpiling SkipUI kills skipstone with SIGSEGV (exit 139) and no message:
skip android buildof skip-ui or skip-fuse-ui fails on Linux. The skip binary is built with the static Linux SDK, whose musl gives non-main threads a 128 KiB stack (glibc: 8 MiB). SwiftParser recurses per nesting level, and SkipUI's nested trailing closures overflow it on aDispatchWorkerthread (gdb backtrace). musl takes its default thread stack fromPT_GNU_STACK, so this links with-z stack-size=8388608: glibc's usual size and musl's maximum.Before / after
Same skipstone binary and command on
ubuntu-24.04, onlyPT_GNU_STACKchanged (run): 128 KiB → exit 139; 512 KiB, 1 MiB, 8 MiB → exit 0, full SkipUI output.Built by this branch (run):
readelf -lWshowsGNU_STACK … 0x800000. With that binary,skip android buildonubuntu-24.04:main, today)On
mainthe same step segfaults on Linux (skip-ui, skip-fuse-ui).Side effects
swift teststill fails on Linux for unrelated reasons (no such module 'CoreGraphics'in skip-ui; duplicate static products in skip-fuse-ui).Verified
android-cion Ubuntu, both Swift versions (one job re-run after the toolchain'sswift-buildcrashed in libdispatch, unrelated to the skip binary).Skip Pull Request Checklist:
swift test(not applicable: build script only)android-ci, above)Written with Claude Code: the diagnosis, the patch and the runs above, each from a run.
🤖 Generated with Claude Code