mprotect returned EACCES on macOS
Hi! First of all, thank you very much for this asset, it’s been really useful and well put together. I wanted to report an issue I encountered when running the asset on macOS, along with a suggested fix that should resolve it cleanly:
When running the asset on macOS, Unity throws the following runtime exception during initialization.
This happens during Harmony’s self-test / detour initialization phase and prevents the asset from working on Mac
This is a known Harmony bug on macOS related to memory protection (mprotect) restrictions.
Specifically:
- macOS enforces stricter W^X (Write XOR Execute) memory rules
- Older versions of Harmony attempt to change memory permissions in a way that is blocked by the OS
- This causes
mprotectto returnEACCES, crashing during Harmony initialization
The issue is well documented and fixed upstream in Harmony: https://github.com/pardeike/Harmony/issues/424
Please upgrade the bundled Harmony dependency from Harmony 2.2.2 to Harmony 2.4.2 (or newer).
I really appreciate the work you’ve put into this asset, and I hope this report helps improve macOS compatibility for other users as well.