Skip to content

Commit ac873a7

Browse files
committed
Updated to use SANITIZER_CAN_USE_PREINIT_ARRAY per Vitaly's feedback
1 parent 075ff47 commit ac873a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/hwasan/hwasan_linux.cpp

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

108108
static void InitializeShadowBaseAddress(uptr shadow_size_bytes) {
109-
// Android static HWASan doesn't initialize flags correctly
110-
if (!SANITIZER_ANDROID && flags()->fixed_shadow_base != (uptr)-1) {
109+
if (SANITIZER_CAN_USE_PREINIT_ARRAY &&
110+
flags()->fixed_shadow_base != (uptr)-1) {
111111
__hwasan_shadow_memory_dynamic_address = flags()->fixed_shadow_base;
112112
} else {
113113
__hwasan_shadow_memory_dynamic_address =

0 commit comments

Comments
 (0)