[all-commits] [llvm/llvm-project] a8d3ae: [Driver] Default -fsanitize-address-globals-dead-s...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jun 12 17:58:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a8d3ae712290d6f85db2deb9164181058f5c1307
https://github.com/llvm/llvm-project/commit/a8d3ae712290d6f85db2deb9164181058f5c1307
Author: Fangrui Song <i at maskray.me>
Date: 2023-06-12 (Mon, 12 Jun 2023)
Changed paths:
M clang/lib/Driver/SanitizerArgs.cpp
M clang/test/Driver/fsanitize.c
Log Message:
-----------
[Driver] Default -fsanitize-address-globals-dead-stripping to true for ELF
-fsanitize-address-globals-dead-stripping is the default for non-ELF
platforms. For ELF, we disabled it to work around an ancient gold 2.26
bug. However, some platforms (Fuchsia and PS) default the option to
true.
This patch changes -fsanitize-address-globals-dead-stripping to true for all ELF
platforms. Without specifying -fdata-sections (non-default for most ELF
platforms), `asan_globals` can only be GCed if the monolithic .data/.bss section
is GCed, which makes it less effective.
However, I think this simplified rule is better than making the
-fsanitize-address-globals-dead-stripping default dependent on another option.
Related: D120394
Close https://github.com/llvm/llvm-project/issues/63127
Reviewed By: #sanitizers, eugenis, phosek
Differential Revision: https://reviews.llvm.org/D152604
More information about the All-commits
mailing list