Discussion:
[Bug cli/23365] New: macOS does not disable ASLR
tromey at sourceware dot org
2018-07-03 16:33:52 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23365

Bug ID: 23365
Summary: macOS does not disable ASLR
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: tromey at sourceware dot org
Target Milestone: ---

darwin_nat_target doesn't override supports_disable_randomization,
but it could.

lldb uses a special Darwin posix_spawn flag for this:

#ifndef _POSIX_SPAWN_DISABLE_ASLR
#define _POSIX_SPAWN_DISABLE_ASLR 0x0100
#endif

...

short flags = POSIX_SPAWN_START_SUSPENDED | POSIX_SPAWN_SETEXEC |
POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK;

// Disable ASLR if we were asked to
if (disable_aslr)
flags |= _POSIX_SPAWN_DISABLE_ASLR;
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-07-09 10:48:14 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=23365

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target| |*-*-darwin*
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...