Commit 55c7faab authored by jiayl's avatar jiayl Committed by Commit bot

Revert of Another attempt to fix debug info stripping for ASan on OSX...

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}
parent f1546bfa
......@@ -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
......@@ -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
......
......@@ -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
......@@ -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"', {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment