diff options
| author | Jason Evans <jasone@canonware.com> | 2017-04-21 18:00:36 (GMT) |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2017-04-21 21:34:35 (GMT) |
| commit | 3823effe126ec602c438b02eb70d4c258a2f0e3f (patch) | |
| tree | 11d3627895df246d4553ab733fd3a3f2050fa900 /include | |
| parent | b2a8453a3fa653dc71f82ac9df64b012917f6b8c (diff) | |
| download | jemalloc-3823effe126ec602c438b02eb70d4c258a2f0e3f.zip jemalloc-3823effe126ec602c438b02eb70d4c258a2f0e3f.tar.gz jemalloc-3823effe126ec602c438b02eb70d4c258a2f0e3f.tar.bz2 | |
Remove --enable-ivsalloc.
Continue to use ivsalloc() when --enable-debug is specified (and add
assertions to guard against 0 size), but stop providing a documented
explicit semantics-changing band-aid to dodge undefined behavior in
sallocx() and malloc_usable_size(). ivsalloc() remains compiled in,
unlike when #211 restored --enable-ivsalloc, and if
JEMALLOC_FORCE_IVSALLOC is defined during compilation, sallocx() and
malloc_usable_size() will still use ivsalloc().
This partially resolves #580.
Diffstat (limited to 'include')
| -rw-r--r-- | include/jemalloc/internal/jemalloc_internal_defs.h.in | 6 | ||||
| -rw-r--r-- | include/jemalloc/internal/jemalloc_preamble.h.in | 18 |
2 files changed, 11 insertions, 13 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal_defs.h.in b/include/jemalloc/internal/jemalloc_internal_defs.h.in index d3d7694..44896ae 100644 --- a/include/jemalloc/internal/jemalloc_internal_defs.h.in +++ b/include/jemalloc/internal/jemalloc_internal_defs.h.in @@ -225,12 +225,6 @@ #undef JEMALLOC_INTERNAL_FFS /* - * JEMALLOC_IVSALLOC enables ivsalloc(), which verifies that pointers reside - * within jemalloc-owned extents before dereferencing them. - */ -#undef JEMALLOC_IVSALLOC - -/* * If defined, explicitly attempt to more uniformly distribute large allocation * pointer alignments across all cache indices. */ diff --git a/include/jemalloc/internal/jemalloc_preamble.h.in b/include/jemalloc/internal/jemalloc_preamble.h.in index 0e2ce31..dc21cf4 100644 --- a/include/jemalloc/internal/jemalloc_preamble.h.in +++ b/include/jemalloc/internal/jemalloc_preamble.h.in @@ -132,13 +132,6 @@ static const bool config_xmalloc = false #endif ; -static const bool config_ivsalloc = -#ifdef JEMALLOC_IVSALLOC - true -#else - false -#endif - ; static const bool config_cache_oblivious = #ifdef JEMALLOC_CACHE_OBLIVIOUS true @@ -164,5 +157,16 @@ static const bool have_percpu_arena = false #endif ; +/* + * Undocumented, and not recommended; the application should take full + * responsibility for tracking provenance. + */ +static const bool force_ivsalloc = +#ifdef JEMALLOC_FORCE_IVSALLOC + true +#else + false +#endif + ; #endif /* JEMALLOC_PREAMBLE_H */ |
