Skip to content

Commit 38cf3d4

Browse files
committed
fix(release): fail smoke test on SIGKILLed binary
The release smoke test only treated exit 126 and 127 as exec failures, so a compiled macOS binary killed by the kernel for an invalid code signature (exit 137) passed silently and would have shipped dead on arrival. Treat 137 as a fatal smoke failure.
1 parent 66683c3 commit 38cf3d4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎scripts/release.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ smoke_bin() { # smoke_bin LABEL BINARY
176176
local rc=0
177177
"$bin" --__release_smoke__ >/dev/null 2>&1 || rc=$?
178178
# 126 = cannot execute, 127 = not found — real link/exec failures.
179-
if [ "$rc" -eq 126 ] || [ "$rc" -eq 127 ]; then
179+
# 137 = SIGKILL before any code ran: on macOS that is the kernel rejecting an
180+
# invalid code signature (see compile_bin), so the binary is dead on arrival.
181+
if [ "$rc" -eq 126 ] || [ "$rc" -eq 127 ] || [ "$rc" -eq 137 ]; then
180182
die "smoke: cannot execute $label binary (rc=$rc)"
181183
fi
182184
# Non-zero from "unrecognized flag" (or similar) still proves the binary ran.

0 commit comments

Comments
 (0)