Commit 3cfcdcc
authored
fix(compile): bump libsui to 0.16.1 to survive eu-strip in flatpak (#35699)
Fixes #35633
## Problem
Standalone binaries produced by `deno compile` segfault (exit 139) after
`eu-strip` runs over them — which `flatpak-builder` does automatically
during a flatpak build. Regression in Deno 2.9, bisected to the libsui
0.16.0 bump (#35467).
## Root cause
libsui's in-place `Elf::append` (new in 0.16.0) relocates the program
header table past the original EOF, into the file gap just before the
appended note. `eu-strip` (elfutils, as run by flatpak-builder) lays the
stripped output out itself with `ELF_F_LAYOUT` and zero-fills every file
gap that falls between two allocated sections. With only a note-sized
`.note.sui` section past that gap, eu-strip treats the relocated program
header table as dead space and zeroes it → all-NULL program headers →
segfault on exec.
## Fix
libsui 0.16.1 (denoland/sui#75) covers the relocated program header
table with a dedicated allocated `.sui.phdrs` section so section-based
strip tools preserve it. This bumps the dependency and adds a spec test
that `eu-strip`s a compiled binary and asserts it still runs (skips
gracefully where `eu-strip` isn't installed).
## Verification
Reproduced and fixed against the exact flatpak toolchain (elfutils
**0.193**, built from source) on Linux x86_64:
- real `deno 2.9.0` compiled binary + eu-strip 0.193 (flatpak flags) →
**segfault 139**; with 0.16.1 → **runs**
- every binary shape (PIE+RELR, plain PIE, non-PIE, large `.bss`,
section-header-stripped, fully stripped) × eu-strip 0.193 & 0.190 →
runs, program headers intact
- payload sizes 1 B – 1 MB → payload still recoverable after strip
- real denort 2.9.0 base → program headers intact after strip
- binutils `strip` note-survival preserved (unchanged from 0.16.0)1 parent 7073436 commit 3cfcdcc
5 files changed
Lines changed: 66 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments