summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-11-21 00:10:08 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-11-21 10:56:17 +0300
commit2914cbff391e50959961c70a3f6a5aa5903a0fc7 (patch)
treeff69002a2518440575d00854d80e745404c72630 /malloc.c
parentaf409e4bdfa25bbab911a706a9f123d98be54c23 (diff)
downloadbdwgc-2914cbff391e50959961c70a3f6a5aa5903a0fc7.tar.gz
Place no_sanitize attributes in a GCC-compliant way
Now the attributes precede the function prototypes (the format is: <attribute> void f(void) <body>). * finalize.c (GC_should_invoke_finalizers): Move GC_ATTR_NO_SANITIZE_THREAD attribute to the beginning of the function prototype (even before GC_API, GC_INNER or static). * malloc.c (fill_size_map): Likewise. * mark.c (GC_noop1, GC_mark_from, GC_push_all_eager): Likewise. * mark.c [WRAP_MARK_SOME && PARALLEL_MARK] (GC_push_conditional_eager): Likewise. * misc.c [THREADS] (next_random_no): Likewise. * os_dep.c [MPROTECT_VDB && THREADS && AO_HAVE_test_and_set_acquire] (async_set_pht_entry_from_index): Likewise. * os_dep.c [MPROTECT_VDB] (is_header_found_async): Likewise. * pthread_stop_world.c [!NACL && !GC_OPENBSD_UTHREADS] (update_last_stop_count): Likewise. * pthread_stop_world.c [!NACL && !GC_OPENBSD_UTHREADS && GC_ENABLE_SUSPEND_THREAD] (set_suspended_ext_flag, GC_resume_thread): Likewise. * pthread_support.c [THREAD_SANITIZER && (USE_SPIN_LOCK || !NO_PTHREAD_TRYLOCK)] (is_collecting): Likewise. * pthread_support.c [USE_SPIN_LOCK] (set_last_spins_and_high_spin_max, reset_spin_max): Likewise. * mark.c (GC_mark_from, GC_push_all_eager): Move GC_ATTR_NO_SANITIZE_ADDR, GC_ATTR_NO_SANITIZE_MEMORY attributes to the beginning of the function prototype. * mach_dep.c (GC_with_callee_saves_pushed): Likewise. * mark.c [WRAP_MARK_SOME && PARALLEL_MARK] (GC_push_conditional_eager): Likewise.
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc.c b/malloc.c
index d2b2aeb7..eb0e80f1 100644
--- a/malloc.c
+++ b/malloc.c
@@ -107,8 +107,8 @@ STATIC ptr_t GC_alloc_large_and_clear(size_t lb, int k, unsigned flags)
/* acquiring the allocation lock provided the obtained value is used */
/* according to the pattern given in alloc.c file (see the comment */
/* about GC_allocobj usage and, e.g., GC_malloc_kind_global code). */
+GC_ATTR_NO_SANITIZE_THREAD
static void fill_size_map(size_t low_limit, size_t byte_sz, size_t granule_sz)
- GC_ATTR_NO_SANITIZE_THREAD
{
for (; low_limit <= byte_sz; low_limit++)
GC_size_map[low_limit] = granule_sz;