Commit 0b804d00 authored by treib's avatar treib Committed by Commit bot

Revert of Reland https://codereview.chromium.org/298333007/: Enable...

Revert of Reland https://codereview.chromium.org/298333007/: Enable mac_strip_release under ASan on OSX. Remo… (patchset #1 id:1 of https://codereview.chromium.org/517803004/)

Reason for revert:
Breaks *lots* of browser_tests on Mac ASan. See e.g.:
http://build.chromium.org/p/chromium.memory/buildstatus?builder=Mac%20ASan%2064%20Tests%20%281%29&number=2036
http://build.chromium.org/p/chromium.memory/buildstatus?builder=Mac%20ASan%2064%20Tests%20%282%29&number=2600
http://build.chromium.org/p/chromium.memory/buildstatus?builder=Mac%20ASan%2064%20Tests%20%283%29&number=2424

Original issue's description:
> Reland https://codereview.chromium.org/298333007/: Enable mac_strip_release under ASan on OSX. Remove the .saves files.
>
> The reasons for reverting the CL hadn't been documented. I'm going to reland and update the bugs.
>
> 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.
> This CL deletes the .saves files and turns mac_strip_release on for ASan
> builds.
>
> BUG=148383, 242503, 170739, 166857
> TBR=mark@chromium.org
>
> Committed: https://chromium.googlesource.com/chromium/src/+/d5319a149964f953e7506c1ff2b33f90974d19ea

TBR=mark@chromium.org,glider@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=148383, 242503, 170739, 166857

Review URL: https://codereview.chromium.org/522743003

Cr-Commit-Position: refs/heads/master@{#292885}
parent 89a28079
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# 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 by Xcode from the binaries
# built for Mac OS X using AddressSanitizer
# (http://dev.chromium.org/developers/testing/addresssanitizer).
___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
...@@ -2141,8 +2141,9 @@ ...@@ -2141,8 +2141,9 @@
'clang%': 1, 'clang%': 1,
}], }],
['asan==1 and OS=="mac"', { ['asan==1 and OS=="mac"', {
# Strip and produce the .dSYM files. # TODO(glider): we do not strip ASan binaries until the dynamic ASan
'mac_strip_release': 1, # runtime is fully adopted. See http://crbug.com/242503.
'mac_strip_release': 0,
}], }],
['tsan==1', { ['tsan==1', {
'use_custom_libcxx%': 1, 'use_custom_libcxx%': 1,
...@@ -4985,6 +4986,16 @@ ...@@ -4985,6 +4986,16 @@
], ],
}, },
], ],
'conditions': [
['asan==1', {
'variables': {
'asan_saves_file': 'asan.saves',
},
'xcode_settings': {
'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
},
}],
],
'target_conditions': [ 'target_conditions': [
['mac_pie==1 and release_valgrind_build==0', { ['mac_pie==1 and release_valgrind_build==0', {
# Turn on position-independence (ASLR) for executables. When # Turn on position-independence (ASLR) for executables. When
...@@ -5024,6 +5035,13 @@ ...@@ -5024,6 +5035,13 @@
# additional flags are added with STRIPFLAGS. # additional flags are added with STRIPFLAGS.
'STRIPFLAGS': '-x', 'STRIPFLAGS': '-x',
}], # _type=="shared_library" or _type=="loadable_module" }], # _type=="shared_library" or _type=="loadable_module"
['_type=="executable"', {
'conditions': [
['asan==1', {
'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
}]
],
}], # _type=="executable" and asan==1
], # target_conditions ], # target_conditions
}, # xcode_settings }, # xcode_settings
}, # configuration "Release" }, # configuration "Release"
......
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# 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 browser and
# helper app executables built with AddressSanitizer
# (http://dev.chromium.org/developers/testing/addresssanitizer).
# 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_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
...@@ -242,6 +242,12 @@ ...@@ -242,6 +242,12 @@
'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
}, },
}], }],
['asan==1', {
'xcode_settings': {
# Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
},
}],
['component=="shared_library"', { ['component=="shared_library"', {
'xcode_settings': { 'xcode_settings': {
'LD_RUNPATH_SEARCH_PATHS': [ 'LD_RUNPATH_SEARCH_PATHS': [
......
...@@ -458,6 +458,12 @@ ...@@ -458,6 +458,12 @@
['chrome_multiple_dll', { ['chrome_multiple_dll', {
'defines': ['CHROME_MULTIPLE_DLL'], 'defines': ['CHROME_MULTIPLE_DLL'],
}], }],
['OS=="mac" and asan==1', {
'xcode_settings': {
# Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
},
}],
['OS=="linux"', { ['OS=="linux"', {
'conditions': [ 'conditions': [
['branding=="Chrome"', { ['branding=="Chrome"', {
......
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