I'd rather not use stdio to let it know.
That seems like a better option. Or use some other IPC mechanism to get the port number back to A, like writing it to a file.
Yeah, unfortunately I cannot use stdio in this particular case. I ended up talking over a FIFO, created with mkfifo(2). Ideally I'd use Pipe() but the file descriptors doesn't seem to be inherited by the child process that is spawned with Process(). I'd assume it would be possible if I used posix_spawn and friends but I'd prefer to stay with the higher-level APIs, if possible. Am I missing something?
Post
Replies
Boosts
Views
Activity
Yeah we have strong suspicion that our JIT code is indeed the culprit after all, I will update this thread accordingly once I know more. Thank you for your support.
Oh, If you wanted me to have just the allow-jit entitlement but no --options runtime, that segfaults too:
codesign \
--sign $identity \
--verbose=4 \
--entitlements=erts/etc/darwin/Entitlements.plist \
release/*/erts-*/bin/*
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000058
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [4991]
beam.smp_2021-10-05-125400_macbookair.crash
I've accidentally marked the answer as 'accepted', not sure how to revert it. Sorry for the noise.
Hi, thank you for your answer!
By removing hardened runtime, you meant to remove the --option runtime, right? I did that and also removed the --entitlement option. Here are the code signing invocation I have at the moment:
# ad-hoc identity
identity="-"
codesign \
--sign $identity \
--verbose=4 \
release/*/erts-*/bin/*
I'm still getting the segfault:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000058
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [3924]
beam.smp_2021-10-05-122607_macbookair.crash
please find the attached full report below. Apologies if I didn't include all the relevant information.