summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2017-06-22 23:18:30 (GMT)
committerQi Wang <interwq@gmail.com>2017-06-23 20:27:53 (GMT)
commit425463a4465043f5f1ccb7f4b257e31ad95b1ed6 (patch)
tree16ebcb7782fd4d43fbbfff58f499db497caa5a1a /include/jemalloc/internal
parentd6eb8ac8f30745b06744ad5cb2988a392c4448cd (diff)
downloadjemalloc-425463a4465043f5f1ccb7f4b257e31ad95b1ed6.zip
jemalloc-425463a4465043f5f1ccb7f4b257e31ad95b1ed6.tar.gz
jemalloc-425463a4465043f5f1ccb7f4b257e31ad95b1ed6.tar.bz2
Check arena in current context in pre_reentrancy.
Diffstat (limited to 'include/jemalloc/internal')
-rw-r--r--include/jemalloc/internal/jemalloc_internal_inlines_a.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal_inlines_a.h b/include/jemalloc/internal/jemalloc_internal_inlines_a.h
index 854fb1e..24ea416 100644
--- a/include/jemalloc/internal/jemalloc_internal_inlines_a.h
+++ b/include/jemalloc/internal/jemalloc_internal_inlines_a.h
@@ -146,7 +146,10 @@ tcache_get(tsd_t *tsd) {
}
static inline void
-pre_reentrancy(tsd_t *tsd) {
+pre_reentrancy(tsd_t *tsd, arena_t *arena) {
+ /* arena is the current context. Reentry from a0 is not allowed. */
+ assert(arena != arena_get(tsd_tsdn(tsd), 0, false));
+
bool fast = tsd_fast(tsd);
++*tsd_reentrancy_levelp_get(tsd);
if (fast) {