Bug 762446 - Hook jemalloc's abort. r=jlebar
authorMike Hommey <mh+mozilla@glandium.org>
Mon, 11 Jun 2012 08:12:40 +0200
changeset 96389 50e4bd69933ccf14ca7a1afea4e48fb6efa005ae
parent 96388 a78601d88586dfae6ce4a8b1912413cdb3b57c14
child 96390 03098cbeb2ba788908a1019d35f56eb3c94d3fdc
push id22904
push useremorley@mozilla.com
push dateTue, 12 Jun 2012 09:45:09 +0000
treeherdermozilla-central@733994f12c53 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs762446
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 762446 - Hook jemalloc's abort. r=jlebar
memory/build/extraMallocFuncs.c
memory/jemalloc/Makefile.in
--- a/memory/build/extraMallocFuncs.c
+++ b/memory/build/extraMallocFuncs.c
@@ -102,9 +102,15 @@ static void
 _je_malloc_message(void *cbopaque, const char *s)
 {
   __android_log_print(ANDROID_LOG_INFO, "GeckoJemalloc", "%s", s);
 }
 
 void (*je_malloc_message)(void *, const char *s) = _je_malloc_message;
 #endif
 
+#include <mozilla/Assertions.h>
+
+void moz_abort() {
+  MOZ_CRASH();
+}
+
 #endif /* MOZ_JEMALLOC */
--- a/memory/jemalloc/Makefile.in
+++ b/memory/jemalloc/Makefile.in
@@ -40,8 +40,10 @@ endif
 ifeq ($(OS_TARGET),Linux)
 # For mremap
 DEFINES += -D_GNU_SOURCE
 endif
 
 ifdef GNU_CC
 CFLAGS += -std=gnu99
 endif
+
+DEFINES += -Dabort=moz_abort