Closed JamesAldridge closed 10 months ago
Hi @JamesAldridge , like @athre0z mentioned in the original issue, we don't have Intel based Mac hardware available to test this. Could you please help us debugging?
The relevant code is located here: https://github.com/zyantific/zydis/blob/03b7723770e0006a78b1b77f5c9b10d7af0237c9/include/Zydis/ShortString.h#L47-L73
As you can see, we are already using a guard to disable packing for AARCH64 on APPLE:
#if !(defined(ZYAN_AARCH64) && defined(ZYAN_APPLE))
# pragma pack(push, 1)
#endif
Are these macros defined for you when you are building the library?
This is how we define these macros:
I think we just have to get rid of the ARM64 portion of the check and simply do:
#if !defined(ZYAN_APPLE)
I originally assumed that this was only an issue on aarch64 targets where Apple does pointer authentication, but it looks like the toolchain also complains about it on Intel.
Only ZYAN_APPLE and ZYAN_X64 are defined not ZYAN_AARCH64 when i build
I think we just have to get rid of the ARM64 portion of the check and simply do:
#if !defined(ZYAN_APPLE)
I originally assumed that this was only an issue on aarch64 targets where Apple does pointer authentication, but it looks like the toolchain also complains about it on Intel.
That works, just tested
Seems to be the same issue as https://github.com/zyantific/zydis/issues/350
System Specifications:
Operating System: macOS Sonoma 14.1 (23B74) CPU: 2.7 GHz Quad-Core Intel Core i7 Compiler Info: Apple clang version 15.0.0 (clang-1500.0.40.1) Target: x86_64-apple-darwin23.1.0 Thread model: posix
When i build zydis with shared flag, the problem I've encountered is as follows.
Originally posted by @JamesAldridge in https://github.com/zyantific/zydis/issues/350#issuecomment-1893292945