Skip to content

src: only disable PIE on OS X when -prof is passed

Rodrigo Muino Tomonari requested to merge github/fork/bnoordhuis/fix6466 into master

This is a follow-up to commit a5012a04 ("build: unbreak -prof, disable PIE on OS X") that disabled PIE (and therefore ASLR) completely on OS X.

We now scan the command line options and re-exec the process with the _POSIX_SPAWN_DISABLE_ASLR flag set when -prof is specified.

The options parser is smart enough to understand any combination of -prof and -noprof, including alternative spellings like --no_prof.

Fixes: #6466 (closed)

CI: https://ci.nodejs.org/job/node-test-pull-request/2429/

Merge request reports

Loading