Bug 696376 - If stacks_enabled is false, only walk the stack on OS X 32 bits. r=
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Fri, 04 Nov 2011 09:49:48 -0400
changeset 79747 5bbc4fb5b277ea0212f4c210f2a7238dbbe70904
parent 79746 98712a13f4ac96a6892c724fe60dce3a5aa43d3f
child 79748 6a4f90ea47ae91407446003b3a1458ef33945665
push id3126
push userrespindola@mozilla.com
push dateFri, 04 Nov 2011 13:52:33 +0000
treeherdermozilla-inbound@5bbc4fb5b277 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs696376
milestone10.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 696376 - If stacks_enabled is false, only walk the stack on OS X 32 bits. r= dbaron. The 64 bit stack walks lack the InCriticalRange functionality and it looks like the extra walks are causing an orange on leaktest on the bot.
tools/trace-malloc/lib/nsTraceMalloc.c
--- a/tools/trace-malloc/lib/nsTraceMalloc.c
+++ b/tools/trace-malloc/lib/nsTraceMalloc.c
@@ -952,17 +952,17 @@ backtrace(tm_thread *t, int skip, int *i
     stack_buffer_info *info = &t->backtrace_buf;
     void ** new_stack_buffer;
     size_t new_stack_buffer_size;
     nsresult rv;
 
     t->suppress_tracing++;
 
     if (!stacks_enabled) {
-#if defined(XP_MACOSX)
+#if defined(XP_MACOSX) && defined(__i386)
         /* Walk the stack, even if stacks_enabled is false. We do this to
            check if we must set immediate_abort. */
         info->entries = 0;
         rv = NS_StackWalk(stack_callback, skip, info);
         *immediate_abort = rv == NS_ERROR_UNEXPECTED;
         if (rv == NS_ERROR_UNEXPECTED || info->entries == 0) {
             t->suppress_tracing--;
             return NULL;