packaging(linux): riscv64 smoke test sets MALLOC_TRIM_THRESHOLD_ so the CLI doesn't restart under QEMU (#8786)

Since #7914 the CLI restarts itself to set MALLOC_TRIM_THRESHOLD_. Under user-mode
qemu-riscv64 with no binfmt handler the restart can't run the riscv64 binary, glibc's
execvp hands it to /bin/sh, and the release job fails with 'Syntax error: word
unexpected'. Setting the variable skips the restart. Real riscv64 hosts are unaffected.


Claude-Session: https://claude.ai/code/session_01FypgCWNarDG3QfXK2YMzdx

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Martin Ball
2026-12-04 02:27:27 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 500e150132
commit 17da903053
+3 -1
View File
@@ -312,7 +312,9 @@ fi
if [[ -z "${CROSS_TARGET:-}" ]]; then
"$STAGE/usr/bin/wordcraft-cli" --version
elif [[ -n "${EMULATOR:-}" ]]; then
"$EMULATOR" "$STAGE/usr/bin/wordcraft-cli" --version
# Set, so the CLI doesn't restart itself to apply it (malloc_tuning, #7914): under user-mode
# QEMU without binfmt the kernel can't run the restarted foreign binary, and glibc hands it to /bin/sh.
MALLOC_TRIM_THRESHOLD_=131072 "$EMULATOR" "$STAGE/usr/bin/wordcraft-cli" --version
fi
echo "==> done"
ls -lh "$DIST"