You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[1.18.32] Bun 1.4.2 segfault at 0x40 on Android/bionic #23
Crash:
panic: Segmentation fault at address 0x40
Bun v1.4.2 (744846f84) Android arm64
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
bun.report link: screenshot attached (full link in terminal output)
CPU line from crash: neon fp aes crc32 atomics sve
probe_assemble.pyresolve_bun_base() checked the local cache first and accepted any cached version >= 1.4.0. Your (and CI's) cache happened to contain bun-1.4.2, so every rebuild since 1.18.31 silently shipped 1.4.2 instead of the pinned 1.4.0 — while 1.18.30 shipped 1.4.0. That's exactly the working/broken boundary you observed.
Bun v1.4.2 (744846f84) Android arm64 segfaults at 0x40 on this device (segmentation at a near-NULL pointer is consistent with the 0x40 signature reported across multiple Bun versions upstream — this looks like a Bun runtime bug on Android/bionic, not an app bug).
Fixes landed:
resolve_bun_base() now sorts cache candidates so the bind target (1.4.0) wins over newer stray cache entries (still falls back to newer if 1.4.0 is absent).
Restored the previously hidden bun-1.4.0 cache entry.
Rebuilt asset (available on this release):
opencode1_1.18.32_aarch64.deb — rebuilt with Bun 1.4.0, payload sha256 e40a5259a0a3c2ef… (deb) / 2fc4077d1a05b989… (pac), also carries the seccomp shim at lib/opencode/libopencode-crhandler.so (DT_RUNPATH fix) + migrate-to-opencode1.sh.
Verified on-device (Termux, Android arm64):
opencode1 --version → 1.18.32
TUI starts: input box reached at 40 s, typing echoes, no CANNOT LINK / no panic markers
Embedded runtime string = 1.4.0
Please re-download the two 1.18.32 assets from this release (they were clobbered; same names, new content) and re-test. If 1.4.0 still segfaults at 0x40 we'll dig into the sve CPU-feature angle — but I expect this closes it.
[@Hope2333] Fixed — v2.0.12 rebuilt with embedded bun 1.4.0 instead of the crashing 1.4.2.
Root cause: build-bionic.sh pinned bun-1.4.2; the v1.4.2 standalone binary SIGSEGVs at 0x40 on Android/bionic. The A-line transplant already used 1.4.0; the B line did not.
Fix: bun pin patch in build-bionic.sh (idempotent sed rewriting package.json packageManager to [email protected] + assertion). Rebuilt 2.0.12 → --version = opencode v2.0.12 exit 0, embedded bun 1.4.0 (strings-verified), TUI smoke no crash.
Both carry the bun 1.4.0-embedded runtime (the earlier comment's "uploaded" claim was premature — the migrate-fix deb went up first; the two 2.0.12 packages are now genuinely live).
RC3 (Push260922, 2026-09-28) supersedes the per-version rebuilds above — the whole two-generation family was rebuilt with bun 1.4.0 embedded and re-uploaded with PKGREL=3:
v2 native opencode 2.0.0–2.0.12 (deb + pacman, all 1.4.0 — no more 1.4.2 stragglers)
Activity
Hope2333 commentedon Sep 26, 2026
Root cause found — fixed, rebuilt with Bun 1.4.0
Thanks for the high-quality report (exact crash signature + working-vs-broken versions).
Chain that produced your build:
tools/transplant/config/bun-bind.jsonpinstarget: "1.4.0".probe_assemble.pyresolve_bun_base()checked the local cache first and accepted any cached version>= 1.4.0. Your (and CI's) cache happened to containbun-1.4.2, so every rebuild since 1.18.31 silently shipped1.4.2instead of the pinned1.4.0— while 1.18.30 shipped1.4.0. That's exactly the working/broken boundary you observed.Bun v1.4.2 (744846f84) Android arm64segfaults at0x40on this device (segmentation at a near-NULL pointer is consistent with the0x40signature reported across multiple Bun versions upstream — this looks like a Bun runtime bug on Android/bionic, not an app bug).Fixes landed:
resolve_bun_base()now sorts cache candidates so the bind target (1.4.0) wins over newer stray cache entries (still falls back to newer if 1.4.0 is absent).bun-1.4.0cache entry.Rebuilt asset (available on this release):
opencode1_1.18.32_aarch64.deb— rebuilt with Bun 1.4.0, payload sha256e40a5259a0a3c2ef…(deb) /2fc4077d1a05b989…(pac), also carries the seccomp shim atlib/opencode/libopencode-crhandler.so(DT_RUNPATH fix) +migrate-to-opencode1.sh.Verified on-device (Termux, Android arm64):
opencode1 --version→1.18.321.4.0Please re-download the two
1.18.32assets from this release (they were clobbered; same names, new content) and re-test. If 1.4.0 still segfaults at 0x40 we'll dig into thesveCPU-feature angle — but I expect this closes it.fix(transplant,packaging): pin bun bind-target in cache resolution; s…
Hope2333 commentedon Sep 26, 2026
[@Hope2333] Fixed — v2.0.12 rebuilt with embedded bun 1.4.0 instead of the crashing 1.4.2.
Root cause:
build-bionic.shpinnedbun-1.4.2; the v1.4.2 standalone binary SIGSEGVs at 0x40 on Android/bionic. The A-line transplant already used 1.4.0; the B line did not.Fix:
bun pinpatch inbuild-bionic.sh(idempotent sed rewritingpackage.jsonpackageManager to[email protected]+ assertion). Rebuilt 2.0.12 →--version=opencode v2.0.12exit 0, embedded bun 1.4.0 (strings-verified), TUI smoke no crash.New packages uploaded to Push260922:
(2.0.0–2.0.11 remain on 1.4.2; if you hit the same crash there, say the word — same pin rebuild.)
Hope2333 commentedon Sep 26, 2026
Confirmed uploaded & verified on Push260922 now (sha256 crypto-match, not just size):
opencode_2.0.12_aarch64.deb— 48.1 MB,sha256 69e256fde443177b…opencode-2.0.12-1-aarch64.pkg.tar.xz— 48.1 MB,sha256 182c6eebf4616c89…Both carry the bun 1.4.0-embedded runtime (the earlier comment's "uploaded" claim was premature — the migrate-fix deb went up first; the two 2.0.12 packages are now genuinely live).
fix(build-bionic): pin bun-1.4.0 for B line — 1.4.2 segfaults at 0x40 (…
Hope2333 commentedon Sep 28, 2026
RC3 (Push260922, 2026-09-28) supersedes the per-version rebuilds above — the whole two-generation family was rebuilt with bun 1.4.0 embedded and re-uploaded with PKGREL=3:
opencode2.0.0–2.0.12 (deb + pacman, all 1.4.0 — no more 1.4.2 stragglers)opencode-wrapper2.0.0–2.0.12opencode1*1.18.30–1.18.32 (native / wrapper / compressed)Upgrade to the latest:
or grab assets directly: https://github.com/Hope2333/opencode-termux/releases/tag/Push260922 (70 assets, per-file digest-verified against the release notes).
Closing this as the 1.4.2 crash is fully retired from the shelf — reopen if any 1.4.0-era build still segfaults at 0x40 on your device.