Bug 496969 - The stack analysis is broken when compiling with -O3 -fstrict-aliasing.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 08 Jun 2009 18:03:23 -0400
changeset 28999 8a6e95fb0b031aa49ede73d5d791d66111b9622f
parent 28998 27739a61e313ef58410eaaa6d09572ff76547a93
child 29001 c5217ee59f8a9fc8ba8a5e552967749d8e668672
push id7365
push userrsayre@mozilla.com
push dateTue, 09 Jun 2009 02:39:30 +0000
treeherderautoland@66a40d5fda11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs496969
milestone1.9.2a1pre
Bug 496969 - The stack analysis is broken when compiling with -O3 -fstrict-aliasing.
xpcom/analysis/stack.js
--- a/xpcom/analysis/stack.js
+++ b/xpcom/analysis/stack.js
@@ -147,18 +147,21 @@ function process_cp_pre_genericize(fndec
         if (name == "operator new" || name == "operator new []") {
           let fncallobj = dehydra_convert(TREE_TYPE(fncall));
           if (fncallobj.parameters.length == 2 &&
               isVoidPtr(fncallobj.parameters[1]))
             return;
 
           let i;
           for (i in xrange(stack.length - 1, -1, -1)) {
-            if (TREE_CODE(stack[i]) != NOP_EXPR)
-              break;
+            if (TREE_CODE(stack[i]) == NOP_EXPR ||
+                TREE_CODE(stack[i]) == COMPOUND_EXPR)
+              continue;
+            
+            break;
           }
           let assign = stack[i];
           switch (TREE_CODE(assign)) {
           case VAR_DECL:
             break;
             
           case INIT_EXPR:
           case MODIFY_EXPR: