diff options
author | Jason Evans <jasone@canonware.com> | 2016-05-11 05:21:10 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-05-11 05:51:33 (GMT) |
commit | c1e00ef2a6442d1d047950247c757821560db329 (patch) | |
tree | 9b0f1d42e7f35d431b8110baf69ba9a612bfb27b /test/unit/junk.c | |
parent | 0c12dcabc59ea9c95fc38197e7c4bc44663b0a26 (diff) | |
download | jemalloc-c1e00ef2a6442d1d047950247c757821560db329.zip jemalloc-c1e00ef2a6442d1d047950247c757821560db329.tar.gz jemalloc-c1e00ef2a6442d1d047950247c757821560db329.tar.bz2 |
Resolve bootstrapping issues when embedded in FreeBSD libc.
b2c0d6322d2307458ae2b28545f8a5c9903d7ef5 (Add witness, a simple online
locking validator.) caused a broad propagation of tsd throughout the
internal API, but tsd_fetch() was designed to fail prior to tsd
bootstrapping. Fix this by splitting tsd_t into non-nullable tsd_t and
nullable tsdn_t, and modifying all internal APIs that do not critically
rely on tsd to take nullable pointers. Furthermore, add the
tsd_booted_get() function so that tsdn_fetch() can probe whether tsd
bootstrapping is complete and return NULL if not. All dangerous
conversions of nullable pointers are tsdn_tsd() calls that assert-fail
on invalid conversion.
Diffstat (limited to 'test/unit/junk.c')
-rw-r--r-- | test/unit/junk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/junk.c b/test/unit/junk.c index 414874a..acddc60 100644 --- a/test/unit/junk.c +++ b/test/unit/junk.c @@ -53,10 +53,10 @@ arena_dalloc_junk_large_intercept(void *ptr, size_t usize) } static void -huge_dalloc_junk_intercept(tsd_t *tsd, void *ptr, size_t usize) +huge_dalloc_junk_intercept(tsdn_t *tsdn, void *ptr, size_t usize) { - huge_dalloc_junk_orig(tsd, ptr, usize); + huge_dalloc_junk_orig(tsdn, ptr, usize); /* * The conditions under which junk filling actually occurs are nuanced * enough that it doesn't make sense to duplicate the decision logic in |