-
-
Notifications
You must be signed in to change notification settings - Fork 37.2k
os x: re-enable PIE (ASLR) #6466
Copy link
Copy link
Closed
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.macosIssues and PRs related to the macOS platform.Issues and PRs related to the macOS platform.securityIssues and PRs related to security.Issues and PRs related to security.
Description
Activity
Metadata
Metadata
Assignees
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.macosIssues and PRs related to the macOS platform.Issues and PRs related to the macOS platform.securityIssues and PRs related to security.Issues and PRs related to security.
Commit a5012a0 disables PIE (and therefore ASLR) on OS X because it breaks profiling of C++ code. Ideally, we'd figure out a way to keep it turned on except when
-profis specified on the command line.I believe the only way to do that (except for having two separate binaries, which I don't think we want) is to re-exec the process with the
_POSIX_SPAWN_DISABLE_ASLR(256) flag set. The flag is ignored for setuid/setgid binaries so in that respect-Wl,-no_pieis superior.