From 6201a89b38afb6bb2a548aeba0ca77090851713b Mon Sep 17 00:00:00 2001 From: "Urabe, Shyouhei" Date: Wed, 24 Apr 2019 11:23:13 +0900 Subject: mark verify functions non-sanitizable These functions purposefully read from memory regions potentially not handled well. Should let sanitizers avoid checking them. --- transient_heap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'transient_heap.c') diff --git a/transient_heap.c b/transient_heap.c index 9aad8a183d..eb94edabf7 100644 --- a/transient_heap.c +++ b/transient_heap.c @@ -155,6 +155,7 @@ rb_transient_heap_dump(void) } #if TRANSIENT_HEAP_CHECK_MODE >= 2 +ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(static void transient_heap_ptr_check(struct transient_heap *theap, VALUE obj)); static void transient_heap_ptr_check(struct transient_heap *theap, VALUE obj) { @@ -164,6 +165,7 @@ transient_heap_ptr_check(struct transient_heap *theap, VALUE obj) } } +ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(static int transient_heap_block_verify(struct transient_heap *theap, struct transient_heap_block *block)); static int transient_heap_block_verify(struct transient_heap *theap, struct transient_heap_block *block) { @@ -559,6 +561,7 @@ rb_transient_heap_mark(VALUE obj, const void *ptr) } } +ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(static const void *transient_heap_ptr(VALUE obj, int error)); static const void * transient_heap_ptr(VALUE obj, int error) { -- cgit v1.2.1