diff options
-rw-r--r-- | mutrace.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -35,6 +35,7 @@ #include <sys/syscall.h> #include <unistd.h> #include <sys/prctl.h> +#include <malloc.h> /* FIXMES: * @@ -221,6 +222,15 @@ static void setup(void) { if (initialized) return; + if (__malloc_hook) { + fprintf(stderr, + "mutrace: Detected non-glibc memory allocator. Your program uses some\n" + "mutrace: alternative memory allocator (jemalloc?) which is not compatible with\n" + "mutrace: mutrace. Please rebuild your program with the standard memory\n" + "mutrace: allocator or fix mutrace to handle yours correctly.\n"); + real_exit(1); + } + t = hash_size; if (parse_env("MUTRACE_HASH_SIZE", &t) < 0 || t <= 0) fprintf(stderr, "mutrace: WARNING: Failed to parse $MUTRACE_HASH_SIZE.\n"); |