Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Issue 7608027: Disable data page (heap) execution when running on Mac OS X 10.7 ("Lion") (Closed)

Created:
9 years, 4 months ago by Mark Mentovai
Modified:
9 years, 4 months ago
Reviewers:
TVL
CC:
chromium-reviews
Visibility:
Public.

Description

Disable data page (heap) execution when running on Mac OS X 10.7 ("Lion"). BUG=91990 TEST=otool -h Whatever.app/Contents/MacOS/Whatever should show the 0x1000000 bit set in the |flags| column Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=96288

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -0 lines) Patch
M build/common.gypi View 1 chunk +17 lines, -0 lines 0 comments Download
A build/mac/make_heap_non_executable.py View 1 chunk +231 lines, -0 lines 0 comments Download
A build/mac/make_heap_non_executable_from_xcode.sh View 1 chunk +15 lines, -0 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Mark Mentovai
9 years, 4 months ago (2011-08-10 15:38:45 UTC) #1
TVL
lgtm http://codereview.chromium.org/7608027/diff/1/build/mac/make_heap_non_executable_from_xcode.sh File build/mac/make_heap_non_executable_from_xcode.sh (right): http://codereview.chromium.org/7608027/diff/1/build/mac/make_heap_non_executable_from_xcode.sh#newcode13 build/mac/make_heap_non_executable_from_xcode.sh:13: do you want to check the sdk here ...
9 years, 4 months ago (2011-08-10 16:02:11 UTC) #2
Mark Mentovai
9 years, 4 months ago (2011-08-10 16:05:04 UTC) #3
http://codereview.chromium.org/7608027/diff/1/build/mac/make_heap_non_executa...
File build/mac/make_heap_non_executable_from_xcode.sh (right):

http://codereview.chromium.org/7608027/diff/1/build/mac/make_heap_non_executa...
build/mac/make_heap_non_executable_from_xcode.sh:13: 
TVL wrote:
> do you want to check the sdk here and warn/error if we're using the 10.7 sdk
> since that's probably the safest way to assume we should be using the
> xcode_setting support instead?

1. There is no xcode_settings support. The linker default as of Xcode 4.0 (note,
4.0 on 10.6, not 4.1 on 10.7) is to set MH_NO_HEAP_EXECUTION when creating an
i386 executable. Use -allow_heap_execute to DISABLE setting this bit.

2. As mentioned in the script, the linker ONLY does this for i386 executables,
not x86_64 executables. I want to (eventually) set the bit on x86_64 executables
as well to cover a corner case.

Powered by Google App Engine
This is Rietveld 408576698