This is almost definitely a codesigning bug. The new ARM64 Macs have much stricter validation when it comes to codesigning, and the kernel will refuse to run unsigned code (and sends a SIGTERM
).
It is strange, though, how involving dune
breaks it.
To make matters worse, there was (and still is?) a bug with the codesigning tool with the latest Xcode such that it will often fail with an ambiguous error about the codesign_allocate
tool being unusable.
Luckily some people over at the golang
project figured out that if you make a new inode for the binary the tool will work on the new copy: https://github.com/golang/go/issues/42684#issuecomment-729543666
@zhtprog does codesigning the binary fix the issue? Obviously it would be a temporary solution, but a solution nonetheless.