This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug cli/23365] New: macOS does not disable ASLR
- From: "tromey at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 03 Jul 2018 16:33:52 +0000
- Subject: [Bug cli/23365] New: macOS does not disable ASLR
- Auto-submitted: auto-generated
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.