Bug 772423 - Hook mozjemalloc's abort(). r=jlebar
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 11 Jul 2012 16:55:39 +0200
changeset 101683 671023de588e98fd14041eec1970dba7226c9b25
parent 101682 31388635897cf738539fe9958c25d69ec5c26795
child 101684 8f3d448b4f393f23a7d19bea7ef0a5cbcf5b4b04
push id1729
push userlsblakk@mozilla.com
push dateMon, 16 Jul 2012 20:02:43 +0000
treeherdermozilla-aurora@f4e75e148951 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs772423
milestone16.0a1
Bug 772423 - Hook mozjemalloc's abort(). r=jlebar
memory/build/extraMallocFuncs.c
memory/mozjemalloc/Makefile.in
--- a/memory/build/extraMallocFuncs.c
+++ b/memory/build/extraMallocFuncs.c
@@ -101,16 +101,15 @@ const char *je_malloc_conf = "narenas:1,
 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
+#endif /* MOZ_JEMALLOC */
 
 #include <mozilla/Assertions.h>
 
 void moz_abort() {
   MOZ_CRASH();
 }
-
-#endif /* MOZ_JEMALLOC */
--- a/memory/mozjemalloc/Makefile.in
+++ b/memory/mozjemalloc/Makefile.in
@@ -39,9 +39,11 @@ endif
 
 # For non release/esr builds, enable (some) fatal jemalloc assertions.  This
 # helps us catch memory errors.  See bug 764192 for details on what
 # MOZ_TEMP_INVESTIGATION is for.
 ifeq (,$(filter release esr,$(MOZ_UPDATE_CHANNEL)))
 DEFINES	+= -DMOZ_JEMALLOC_HARD_ASSERTS -DMOZ_TEMP_INVESTIGATION
 endif
 
+DEFINES += -Dabort=moz_abort
+
 include $(topsrcdir)/config/rules.mk