1

I build a series of tools on macOS 10.15.6 using clang from Xcode 12.1. When the binaries are built, they complete the test runs from within the build folder. However, when I copy them to /usr/local/bin (setting owner, group, and permissions), they all exit on launch with "Killed: 9". dtrace/dtruss both simply report that sip is enabled and nothing else.

The tools are not sandboxed and don't do any kernel level trickery. I've also checked the xattr flags and there are no flags set.

Does anyone have a tip on a tool that I could use on the Mac platform to determine what's going on (gdb is not installed)?

Tim

3
  • lldb is the clang equivalent of gdb. How do you do the run in the build folde, what is the exact command line and what else is in the build folder
    – mmmmmm
    Oct 17, 2020 at 21:14
  • the commands all run test scripts to check each command line argument functionality. There are no external dependencies aside from the system lib system.B and CoreFoundation. When I launch lldb, I get the same killed: 9 with either the file command or the create target command.
    – Timpraetor
    Oct 18, 2020 at 4:10
  • This turned out to be the kernel caching signed binary states. I was copying my new binaries over the previously tested (and signed) binaries. This required deleting the existing binaries, rebooting the system, and then recopying the new binaries.
    – Timpraetor
    Oct 18, 2020 at 17:03

1 Answer 1

5

This was caused by kernel caching of previously signed binaries and my replacing those binaries with newly compiled binaries which weren't part of a signed package.

By deleting the existing binaries, rebooting the Mac to clear the kernel cache, and then recopying the new binaries into place, I sorted the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .