It's possible to disable ASLR on Lion when starting a process using posix_spawn, e.g.:
Ref: http://reverse.put.as/2011/08/11/how-gdb-disables-aslr-in-mac-os-x-lion/
#include <stdio.h> #include <spawn.h> int main(int argc, char* argv[]) { int pid = -1; int retval; posix_spawnattr_t spattr; retval = posix_spawnattr_init(&spattr); retval = posix_spawnattr_setflags(&spattr, POSIX_SPAWN_SETEXEC | 0x100); retval = posix_spawn(&pid, "test", NULL, &spattr, NULL, NULL); return 0; }