Skip to content

Commit 12f77e8

Browse files
authored
Revert "[hwasan] Add fixed_shadow_base flag" (#95435)
Reverts #73980 This broke static hwasan binaries in Android, for some reason the fixed_shadow_base branch gets taken
1 parent 6499c5d commit 12f77e8

File tree

3 files changed

+2
-89
lines changed

3 files changed

+2
-89
lines changed

compiler-rt/lib/hwasan/hwasan_flags.inc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,3 @@ HWASAN_FLAG(bool, malloc_bisect_dump, false,
8484
// are untagged before the call.
8585
HWASAN_FLAG(bool, fail_without_syscall_abi, true,
8686
"Exit if fail to request relaxed syscall ABI.")
87-
88-
HWASAN_FLAG(
89-
uptr, fixed_shadow_base, -1,
90-
"If not -1, HWASan will attempt to allocate the shadow at this address, "
91-
"instead of choosing one dynamically."
92-
"Tip: this can be combined with the compiler option, "
93-
"-hwasan-mapping-offset, to optimize the instrumentation.")

compiler-rt/lib/hwasan/hwasan_linux.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,8 @@ static uptr GetHighMemEnd() {
106106
}
107107

108108
static void InitializeShadowBaseAddress(uptr shadow_size_bytes) {
109-
if (flags()->fixed_shadow_base != (uptr)-1) {
110-
__hwasan_shadow_memory_dynamic_address = flags()->fixed_shadow_base;
111-
} else {
112-
__hwasan_shadow_memory_dynamic_address =
113-
FindDynamicShadowStart(shadow_size_bytes);
114-
}
109+
__hwasan_shadow_memory_dynamic_address =
110+
FindDynamicShadowStart(shadow_size_bytes);
115111
}
116112

117113
static void MaybeDieIfNoTaggingAbi(const char *message) {

compiler-rt/test/hwasan/TestCases/Linux/fixed-shadow.c

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)