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

Issue 25687005: Set the default ASan options for executables built with ASan on Linux. (Closed)

Created:
7 years, 2 months ago by Alexander Potapenko
Modified:
7 years, 1 month ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Set the default ASan options for executables built with ASan on Linux. This CL introduces a module, base/debug/sanitizer_options.cc, which will override the defaults for various dynamic tools (only ASan at this moment). For every executable built with a dynamic tool this module will be linked into that executable, providing weak functions to be called by the tool. The existing declaration of __asan_default_options() in chrome/app/chrome_exe_main_gtk.cc has been moved into sanitizer_options.cc (now every binary built with GOOGLE_CHROME_BUILD=1 will have the same options as google-chrome-asan. The existing declaration of __asan_default_options() in chrome/nacl/nacl_helper_linux.cc has been kept as is, but we had to remove -Wl,-u_sanitizer_options_link_helper to avoid picking sanitizer_options.cc. GYP changes for OSX and iOS will be committed separately. BUG=302040 R=thakis@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=234207

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 6

Patch Set 8 : #

Total comments: 4

Patch Set 9 : #

Patch Set 10 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -25 lines) Patch
M base/base.gyp View 1 2 3 4 5 6 7 8 1 chunk +23 lines, -0 lines 0 comments Download
A base/debug/sanitizer_options.cc View 1 2 3 4 5 6 7 1 chunk +49 lines, -0 lines 0 comments Download
M build/common.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 2 comments Download
M chrome/app/chrome_exe_main_gtk.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -25 lines 0 comments Download
M chrome/nacl.gypi View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
Alexander Potapenko
Nico, can you please take a look?
7 years, 1 month ago (2013-10-25 09:06:21 UTC) #1
_com_google_glider
Ping? On Oct 25, 2013 1:06 PM, <glider@chromium.org> wrote: > Reviewers: Nico, > > Message: ...
7 years, 1 month ago (2013-10-30 04:44:30 UTC) #2
Nico
Cool! https://codereview.chromium.org/25687005/diff/185001/base/debug/sanitizer_options.cc File base/debug/sanitizer_options.cc (right): https://codereview.chromium.org/25687005/diff/185001/base/debug/sanitizer_options.cc#newcode32 base/debug/sanitizer_options.cc:32: const char *kAsanDefaultOptions = const char kAsanDefaultOptions[]? https://codereview.chromium.org/25687005/diff/185001/build/common.gypi ...
7 years, 1 month ago (2013-10-30 04:50:37 UTC) #3
Alexander Potapenko
https://codereview.chromium.org/25687005/diff/185001/base/debug/sanitizer_options.cc File base/debug/sanitizer_options.cc (right): https://codereview.chromium.org/25687005/diff/185001/base/debug/sanitizer_options.cc#newcode32 base/debug/sanitizer_options.cc:32: const char *kAsanDefaultOptions = On 2013/10/30 04:50:37, Nico wrote: ...
7 years, 1 month ago (2013-10-30 14:25:55 UTC) #4
Nico
https://codereview.chromium.org/25687005/diff/605001/base/debug/sanitizer_options.cc File base/debug/sanitizer_options.cc (right): https://codereview.chromium.org/25687005/diff/605001/base/debug/sanitizer_options.cc#newcode13 base/debug/sanitizer_options.cc:13: // -Wl,-u_sanitizer_options_link_helper From the man page of `man ld` ...
7 years, 1 month ago (2013-10-30 14:29:47 UTC) #5
Alexander Potapenko
https://codereview.chromium.org/25687005/diff/605001/base/debug/sanitizer_options.cc File base/debug/sanitizer_options.cc (right): https://codereview.chromium.org/25687005/diff/605001/base/debug/sanitizer_options.cc#newcode13 base/debug/sanitizer_options.cc:13: // -Wl,-u_sanitizer_options_link_helper Yeah, exactly. From `man ld` on Linux: ...
7 years, 1 month ago (2013-10-30 14:43:19 UTC) #6
Nico
On Wed, Oct 30, 2013 at 7:43 AM, <glider@chromium.org> wrote: > > https://codereview.chromium.**org/25687005/diff/605001/base/** > debug/sanitizer_options.cc<https://codereview.chromium.org/25687005/diff/605001/base/debug/sanitizer_options.cc> ...
7 years, 1 month ago (2013-10-30 14:50:34 UTC) #7
Alexander Potapenko
> > Oh, so putting this into a '_type=="executable"' in the target_conditions a > few ...
7 years, 1 month ago (2013-10-30 14:58:10 UTC) #8
Nico
On Wed, Oct 30, 2013 at 7:58 AM, <glider@chromium.org> wrote: > > > Oh, so ...
7 years, 1 month ago (2013-10-30 15:29:43 UTC) #9
_com_google_glider
https://codereview.chromium.org/11642018/#msg11 On Wed, Oct 30, 2013 at 7:29 PM, Nico Weber <thakis@chromium.org> wrote: > On ...
7 years, 1 month ago (2013-10-31 10:44:12 UTC) #10
Alexander Potapenko
FYI I've uploaded Patch Set 9, where I tried putting the dependency into a '_type=="executable"' ...
7 years, 1 month ago (2013-11-01 11:34:49 UTC) #11
Alexander Potapenko
Re-uploaded the working version from Patch Set 8 with every target (including non-executables) depending on ...
7 years, 1 month ago (2013-11-01 11:36:59 UTC) #12
Alexander Potapenko
Any other comments/concerns?
7 years, 1 month ago (2013-11-01 15:30:43 UTC) #13
Nico
Maybe we can fix that gyp bug one day. Maybe you can file an issue ...
7 years, 1 month ago (2013-11-01 23:56:22 UTC) #14
Alexander Potapenko
Filed https://code.google.com/p/gyp/issues/detail?id=380 https://codereview.chromium.org/25687005/diff/815001/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/25687005/diff/815001/build/common.gypi#newcode3297 build/common.gypi:3297: 'dependencies': [ On 2013/11/01 23:56:22, Nico (ooo ...
7 years, 1 month ago (2013-11-11 09:41:40 UTC) #15
Alexander Potapenko
Committed patchset #10 manually as r234207 (presubmit successful).
7 years, 1 month ago (2013-11-11 09:42:05 UTC) #16
Alexander Potapenko
7 years, 1 month ago (2013-11-15 15:17:34 UTC) #17
Message was sent while issue was closed.
On 2013/11/11 09:42:05, Alexander Potapenko wrote:
> Committed patchset #10 manually as r234207 (presubmit successful).

This commit resulted in http://crbug.com/317670 and I had to revert it.
In fact I'm completely puzzled with how the problem manifests and don't know how
to proceed.
Perhaps a good thing to do is to fix
https://code.google.com/p/gyp/issues/detail?id=380 -- I'll look into that.

Powered by Google App Engine
This is Rietveld 408576698