How to disable ASLR on MacBook Pro M1?

I am a developer involved in FPC/Lazarus group. A user has raised his problem. He is on an M1 processor. An app he's developing frequently crashes at startup. But the app doesn't crash if you run it with lldb. Therefore he get only a useless stack trace, with a list of addresses which he can't interpret, because at each run addresses are different, of course, because of ASLR.

I'm trying to help. I have located a hack to alter the header flags, but apparently it works only on x86_64 architecture, and the app doesn't crash if you compile it for x86_64!. If you modify the header flags in an aarch64 architecture lldb refuses to load it, and launching the app it doesn't start.

We're chasing a tricky bug, something most likely connected with subtle timing issues, and being able to interpret the stack trace might help to locate the code area to investigate.

Any idea?

MacBook Pro (M2 Max, 2023)

Posted on Jun 15, 2023 11:38 AM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to disable ASLR on MacBook Pro M1?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.