From 6af0f442c7d16ab526c0e6859aa97ff217b73f99 Mon Sep 17 00:00:00 2001 From: KJ Tsanaktsidis Date: Fri, 12 Jan 2024 17:32:16 +1100 Subject: Revert "Make stack bounds detection work with ASAN" This reverts commit 6185cfdf38e26026c6d38220eeca48689e54cdcf. --- internal/sanitizers.h | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'internal') diff --git a/internal/sanitizers.h b/internal/sanitizers.h index 6b2a131925..7b7d166c74 100644 --- a/internal/sanitizers.h +++ b/internal/sanitizers.h @@ -64,8 +64,6 @@ # define __asan_poison_memory_region(x, y) # define __asan_unpoison_memory_region(x, y) # define __asan_region_is_poisoned(x, y) 0 -# define __asan_get_current_fake_stack() NULL -# define __asan_addr_is_in_fake_stack(fake_stack, slot, start, end) NULL #endif #if !__has_feature(memory_sanitizer) @@ -185,28 +183,4 @@ asan_unpoison_object(VALUE obj, bool newobj_p) asan_unpoison_memory_region(ptr, SIZEOF_VALUE, newobj_p); } - -/*! - * Checks if the given pointer is on an ASAN fake stack. If so, it returns the - * address this variable has on the real frame; if not, it returns the origin - * address unmodified. - * - * n.b. - _dereferencing_ the returned address is meaningless and should not - * be done; even though ASAN reserves space for the variable in both the real and - * fake stacks, the _value_ of that variable is only in the fake stack. - * - * n.b. - this only works for addresses passed in from local variables on the same - * thread, because the ASAN fake stacks are threadlocal. - * - * \param[in] slot the address of some local variable - * \retval a pointer to something from that frame on the _real_ machine stack - */ -static inline void * -asan_get_real_stack_addr(void* slot) -{ - VALUE *addr; - addr = __asan_addr_is_in_fake_stack(__asan_get_current_fake_stack(), slot, NULL, NULL); - return addr ? addr : slot; -} - #endif /* INTERNAL_SANITIZERS_H */ -- cgit v1.2.3