diff options
author | jiayl <jiayl@chromium.org> | 2014-09-24 09:25:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-24 16:25:26 +0000 |
commit | 55c7faab2f0ce87d91d4cb995a41bb260210e773 (patch) | |
tree | fed0e2767e657a699432306ea6155a2231de5232 | |
parent | f1546bfaabc3492485219dfb51a270bae8da41b9 (diff) | |
download | chromium_src-55c7faab2f0ce87d91d4cb995a41bb260210e773.zip chromium_src-55c7faab2f0ce87d91d4cb995a41bb260210e773.tar.gz chromium_src-55c7faab2f0ce87d91d4cb995a41bb260210e773.tar.bz2 |
Revert of Another attempt to fix debug info stripping for ASan on OSX (patchset #5 id:80001 of https://codereview.chromium.org/560323004/)
Reason for revert:
Broke mac asan content_browsertests:
http://build.chromium.org/p/chromium.memory/builders/Mac%20ASan%20Tests%20%281%29/builds/4311/steps/content_browsertests/logs/stdio
Original issue's description:
> Another attempt to fix debug info stripping for ASan on OSX
>
> Unce upon a time the ASan runtime library used to be statically linked into
> the executables on OSX.
> Because that library provided a number of API functions needed by the shared
> libraries, we had custom ASan-specific .saves files that told the `strip`
> utility to preserve those functions when stripping the executables.
>
> Then ASan switched to using dynamic runtime library, which instantly broke the
> stripping step, because the executables weren't necessarily referencing all the
> ASan API functions (issue 242503).
> As a result, stripping has been disabled, and we haven't had .dSYM debug info
> for ASan builds for more than a year now (issue 148383).
>
> Because the ASan API functions are now undefined in the executables, it's
> actually senseless to use the .saves files to preserve those functions in each
> executable. However __asan_default_options still must be preserved to be accessible
> from the ASan runtime.
>
> This CL removes all ASan symbols except for __asan_default_options from the .saves files
> and makes Chromium.app and Chromium Helper.app correctly use app_asan.saves.
> It also turns mac_strip_release on for ASan builds.
>
> BUG=148383,242503,170739,166857
> R=mark@chromium.org
> TBR=cpu@chromium.org
>
> Committed: https://crrev.com/d051b21c75afc414190db331fd608cc61e3056dc
> Cr-Commit-Position: refs/heads/master@{#296413}
TBR=mark@chromium.org,cpu@chromium.org,glider@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=148383,242503,170739,166857
Review URL: https://codereview.chromium.org/597873004
Cr-Commit-Position: refs/heads/master@{#296434}
-rw-r--r-- | build/asan.saves | 20 | ||||
-rw-r--r-- | build/common.gypi | 8 | ||||
-rw-r--r-- | chrome/app/app_asan.saves | 20 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 6 |
4 files changed, 40 insertions, 14 deletions
diff --git a/build/asan.saves b/build/asan.saves index 2b09ba8..0c4e4ed 100644 --- a/build/asan.saves +++ b/build/asan.saves @@ -2,8 +2,22 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# This file lists symbols that should not be stripped from the Mac executables -# built with AddressSanitizer +# This file lists symbols that should not be stripped by Xcode from the binaries +# built for Mac OS X using AddressSanitizer # (http://dev.chromium.org/developers/testing/addresssanitizer). -___asan_default_options +___asan_init +___asan_handle_no_return +___asan_register_global +___asan_register_globals +___asan_unregister_globals +___asan_report_load1 +___asan_report_load2 +___asan_report_load4 +___asan_report_load8 +___asan_report_load16 +___asan_report_store1 +___asan_report_store2 +___asan_report_store4 +___asan_report_store8 +___asan_report_store16 diff --git a/build/common.gypi b/build/common.gypi index d0fc2b7..6f4223b 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -2150,7 +2150,7 @@ ['asan==1 and OS=="mac"', { # TODO(glider): we do not strip ASan binaries until the dynamic ASan # runtime is fully adopted. See http://crbug.com/242503. - 'mac_strip_release': 1, + 'mac_strip_release': 0, }], ['tsan==1', { 'use_custom_libcxx%': 1, @@ -4997,10 +4997,10 @@ 'conditions': [ ['asan==1', { 'variables': { - 'asan_saves_file_path': 'asan.saves', + 'asan_saves_file': 'asan.saves', }, 'xcode_settings': { - 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file_path)', + 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', }, }], ], @@ -5047,7 +5047,7 @@ 'conditions': [ ['asan==1', { 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', - }], + }] ], }], # _type=="executable" and asan==1 ], # target_conditions diff --git a/chrome/app/app_asan.saves b/chrome/app/app_asan.saves index a69119b..fd8b352 100644 --- a/chrome/app/app_asan.saves +++ b/chrome/app/app_asan.saves @@ -8,7 +8,25 @@ # The list of Chromium application-specific symbols should be the same as that # in chrome/app/app.saves +# The list of symbols that should be preserved in all the binaries built with +# AddressSanitizer should correspond to build/asan.saves + +# Chromium-specific symbols. _main # AddressSanitizer-specific symbols. -___asan_default_options +___asan_init +___asan_handle_no_return +___asan_register_global +___asan_register_globals +___asan_unregister_globals +___asan_report_load1 +___asan_report_load2 +___asan_report_load4 +___asan_report_load8 +___asan_report_load16 +___asan_report_store1 +___asan_report_store2 +___asan_report_store4 +___asan_report_store8 +___asan_report_store16 diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index a7969e8..93386d4 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -90,12 +90,6 @@ '../tools/cygprofile/cygprofile.gyp:cygprofile', ], }], - ['asan==1', { - 'xcode_settings': { - 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves', - 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', - }, - }], ['order_text_section!=""', { 'target_conditions' : [ ['_toolset=="target"', { |