From b6e07d2389d97c98c353fea4f04ec68a7d5a13a0 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Mon, 18 Apr 2016 15:42:09 -0700 Subject: [PATCH] Fix malloc_mutex_assert_[not_]owner() for --enable-lazy-lock case. --- include/jemalloc/internal/mutex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/jemalloc/internal/mutex.h b/include/jemalloc/internal/mutex.h index 581aaf57..5ddae11c 100644 --- a/include/jemalloc/internal/mutex.h +++ b/include/jemalloc/internal/mutex.h @@ -124,7 +124,7 @@ JEMALLOC_INLINE void malloc_mutex_assert_owner(tsd_t *tsd, malloc_mutex_t *mutex) { - if (config_debug) + if (isthreaded && config_debug) witness_assert_owner(tsd, &mutex->witness); } @@ -132,7 +132,7 @@ JEMALLOC_INLINE void malloc_mutex_assert_not_owner(tsd_t *tsd, malloc_mutex_t *mutex) { - if (config_debug) + if (isthreaded && config_debug) witness_assert_not_owner(tsd, &mutex->witness); } #endif