Julian Lettner ced01f3671
[lldb][Darwin] Add process launch --memory-tagging option (#162944)
For debugging and bug-finding workflows on Darwin, support
launching processes with memory tagging for binaries that are
not entitled.

This will cause the process to behave as if the binary was entitled
with:
```
<key>com.apple.security.hardened-process.checked-allocations</key>
<true/>
```

This has no effect on hardware without MTE support.

---------

Co-authored-by: Jonas Devlieghere <jonas@devlieghere.com>
2025-10-14 13:01:24 -07:00

16 lines
222 B
Makefile

C_SOURCES := main.c
EXE := uaf
binary-plain: uaf
binary-entitled: uaf sign
all: binary-entitled
include Makefile.rules
sign: mte-entitlements.plist uaf
ifeq ($(OS),Darwin)
codesign -s - -f --entitlements $^
endif