一段時間以來,我一直在努力解決這個問題。顯然是這樣讀的:Mac 上的核心轉儲檔案在哪里?
而這導致了這一點。
只是為了讓我們 100% 清楚:
我做了:
touch /cores/x
rm /cores/x
所以寫權限是好的。
做過
ulimit -c unlimited
所以應該生成核心。
但即使是微不足道的:
sleep 100 & killall -SIGSEGV sleep
不生成核心。我目前的賭注是作業系統的檔案系統保護功能之一讓我很傷心。另一種可能性是這與 ARM(在 M1 Max 上運行)有關。
任何想法都非常受歡迎......我什至嘗試過這個失敗:(Mac)將核心檔案留在可執行檔案的位置而不是/cores?
uj5u.com熱心網友回復:
我目前在 Mac OS Monterey 上。https://developer.apple.com/forums/thread/694233?answerId=695943022#695943022建議的解決方案對我有用。
快速總結:現在有必要為每個可執行檔案啟用com.apple.security.get-task-allow權利。
示例cat:
先復印一份。必需,因為
cat它位于只讀檔案系統上。% cp $(which cat) cat-copy.entitlements使用com.apple.security.get-task-allow權利集創建一個虛擬物件:% /usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" tmp.entitlements File Doesn't Exist, Will Create: tmp.entitlementscat-copy使用這些權利重新簽名:% codesign -s - -f --entitlements tmp.entitlements cat-copy CrashSelf: replacing existing signature
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/417478.html
標籤:
