Check arena in current context in pre_reentrancy.

This commit is contained in:
Qi Wang
2017-06-22 16:18:30 -07:00
committed by Qi Wang
parent d6eb8ac8f3
commit 425463a446
7 changed files with 51 additions and 47 deletions

View File

@@ -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) {