From ab0015ba0e95f3a4646ee0841140008a40fdbfe2 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 13 Jan 2012 07:24:17 +0100 Subject: [PATCH] Bug 697301 - Avoid the compiler making optimizations to mozalloc_abort that end up corrupting stack traces. r=cjones --- memory/mozalloc/mozalloc_abort.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/memory/mozalloc/mozalloc_abort.cpp b/memory/mozalloc/mozalloc_abort.cpp index 2997e538a68..8161b5f09e5 100644 --- a/memory/mozalloc/mozalloc_abort.cpp +++ b/memory/mozalloc/mozalloc_abort.cpp @@ -58,7 +58,9 @@ static int gDummyCounter; -static void +// Not inlining this function avoids the compiler making optimizations +// that end up corrupting stack traces. +MOZ_NEVER_INLINE static void TouchBadMemory() { // XXX this should use the frame poisoning code