diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-07-15 09:11:42 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-07-15 14:14:24 +0300 |
commit | ed4f7ea68f0983e81dd96a99a9cf4e9c7c58a4e2 (patch) | |
tree | 3764047a1d63336ddb7b44b04257d09af0013544 /mark.c | |
parent | 41d41c30957a952e2a6d93023cf08188f8df949e (diff) | |
download | bdwgc-ed4f7ea68f0983e81dd96a99a9cf4e9c7c58a4e2.tar.gz |
Eliminate ASan stack-buffer-underflow FP in GC_mark_and_push_stack (E2K)
According to the contract, the object p (the argument of
GC_mark_and_push_stack) has passed a preliminary pointer validity
check, but we do not definitely know whether it is valid.
* mark.c (GC_mark_and_push_stack): Add GC_ATTR_NO_SANITIZE_ADDR
attribute.
Diffstat (limited to 'mark.c')
-rw-r--r-- | mark.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1491,10 +1491,12 @@ GC_API struct GC_ms_entry * GC_CALL GC_mark_and_push(void *obj, /* test, but we do not definitely know whether it is valid. */ /* Mark bits are NOT atomically updated. Thus this must be the */ /* only thread setting them. */ +GC_ATTR_NO_SANITIZE_ADDR +GC_INNER void # if defined(PRINT_BLACK_LIST) || defined(KEEP_BACK_PTRS) - GC_INNER void GC_mark_and_push_stack(ptr_t p, ptr_t source) + GC_mark_and_push_stack(ptr_t p, ptr_t source) # else - GC_INNER void GC_mark_and_push_stack(ptr_t p) + GC_mark_and_push_stack(ptr_t p) # define source ((ptr_t)0) # endif { |