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
Bend killed with SIGKILL on macOS (Apple Silicon) after updating via install.sh #1025
**Bend killed with SIGKILL on macOS (Apple Silicon) after updating via install.sh**
After updating with `curl -fsSL https://bend-lang.com/install.sh | sh`, every invocation of `bend` failed immediately with:
terminated by signal SIGKILL (Forced quit)
**Cause:** the installed binary's code signature is invalid. On arm64 macOS the kernel requires every executable to have a valid signature (ad-hoc is fine) and kills the process at launch if the code pages don't match it.
$ file ~/.bend/bin/bend
Mach-O 64-bit executable arm64
$ codesign -dvvv ~/.bend/bin/bend
Signature=adhoc
flags=0x20002(adhoc,linker-signed)
$ codesign --verify --strict -vvv ~/.bend/bin/bend
invalid signature (code or signature have been modified)
The binary carries the linker-applied ad-hoc signature, but its contents were changed after linking, so the signature no longer matches.
**Workaround:** re-sign it ad-hoc:
codesign --force --sign - ~/.bend/bin/bend
After that it runs normally. This presumably needs repeating after each update until it's fixed upstream.
Same here on 2.0.26 and 2.0.27 (Darwin arm64). Two details that may help locate where the binary gets modified after linking.
Only the last code page fails. Parsing the LC_CODE_SIGNATURE SuperBlob and re-hashing every page against the CodeDirectory, exactly 1 of 15551 slots mismatches — the final, partial one:
file size 64191218 sig off 63693472 sig size 497746
CodeDirectory v=0x20400 nCodeSlots=15551 codeLimit=63693472 pageSize=4096
mismatched pages: 1 -> [15550] (bytes 63692800..63693472)
That range is the tail of the __LINKEDIT string table (it ends in ..._expm1\0___exp10\0_log10\0 plus zero padding), so whatever runs after the linker signs the image writes near the end of the string table, not into __TEXT.
The executable is a Bun single-file build. A bend --help that fails for another reason prints Bun v1.4.0 (macOS arm64) and paths under /$bunfs/root/bend, so this is bun build --compile, which injects its payload and re-signs — that step looks like the suspect. Worth noting the signature blob ends exactly at EOF (63693472 + 497746 = 64191218), so nothing is appended past the signature; the payload lives inside the image.
2.0.26 is affected too, so it is not new in 2.0.27. The downloaded tarball's sha256 matches the value baked into install.sh, so the published artifact itself is unsigned-invalid, not the download.
codesign -f -s - ~/.bend/bin/bend does fix it. Since bend update re-runs install.sh, the re-sign has to be repeated after every upgrade — an explicit codesign -f -s - on the compiled output in the release script would settle it upstream.
Were previous versions not affected? I suspect this is due to Darwin or maybe Bun version, because I could not reproduce here in my end, macOs Darwin 26.5.2. It seems that the issue is present in all previous releases as well. Will be fixed in release 2.0.28
anecdotically, happened to me only in latest version after "bend update". that said, I installed the previous one with an agent, maybe it codesigned it sneakily
Activity
iamjoaovytor commentedon Sep 24, 2026
Same here on 2.0.26 and 2.0.27 (Darwin arm64). Two details that may help locate where the binary gets modified after linking.
Only the last code page fails. Parsing the
LC_CODE_SIGNATURESuperBlob and re-hashing every page against the CodeDirectory, exactly 1 of 15551 slots mismatches — the final, partial one:That range is the tail of the
__LINKEDITstring table (it ends in..._expm1\0___exp10\0_log10\0plus zero padding), so whatever runs after the linker signs the image writes near the end of the string table, not into__TEXT.The executable is a Bun single-file build. A
bend --helpthat fails for another reason printsBun v1.4.0 (macOS arm64)and paths under/$bunfs/root/bend, so this isbun build --compile, which injects its payload and re-signs — that step looks like the suspect. Worth noting the signature blob ends exactly at EOF (63693472 + 497746 = 64191218), so nothing is appended past the signature; the payload lives inside the image.2.0.26 is affected too, so it is not new in 2.0.27. The downloaded tarball's sha256 matches the value baked into
install.sh, so the published artifact itself is unsigned-invalid, not the download.codesign -f -s - ~/.bend/bin/benddoes fix it. Sincebend updatere-runsinstall.sh, the re-sign has to be repeated after every upgrade — an explicitcodesign -f -s -on the compiled output in the release script would settle it upstream.Lorenzobattistela commentedon Sep 24, 2026
Were previous versions not affected? I suspect this is due to Darwin or maybe Bun version, because I could not reproduce here in my end, macOs Darwin 26.5.2. It seems that the issue is present in all previous releases as well. Will be fixed in release 2.0.28
dearlordylord commentedon Sep 25, 2026
anecdotically, happened to me only in latest version after "bend update". that said, I installed the previous one with an agent, maybe it codesigned it sneakily