When using LD_PRELOAD to use jemalloc as the memory allocator, Z3 calls malloc_usable_size from glibc instead of jemalloc, triggering a segfault. To reproduce on linux, run LD_PRELOAD=$JEMALLOC_LIB julia --project where $JEMALLOC_LIB is the path to jemalloc, then run the following in the REPL:
Z3 is known to not work well with third party allocators, and one workaround is to disable HAS_MALLOC_USABLE_SIZE to remove the calls to malloc_usable_size.
When using
LD_PRELOAD
to use jemalloc as the memory allocator, Z3 callsmalloc_usable_size
from glibc instead of jemalloc, triggering a segfault. To reproduce on linux, runLD_PRELOAD=$JEMALLOC_LIB julia --project
where$JEMALLOC_LIB
is the path to jemalloc, then run the following in the REPL:Z3 is known to not work well with third party allocators, and one workaround is to disable
HAS_MALLOC_USABLE_SIZE
to remove the calls tomalloc_usable_size
.