Bug 832670 - Don't verify barriers when unwinding frames that finished in JM, r=billm.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 05 Feb 2013 09:44:52 -0700
changeset 120880 b757198a3ba3ee841a64477acff843fbb5c44d81
parent 120879 f33c5e1c1d583d42fe7ee28d5a94a140d765db41
child 120881 8cef88c3bee4a9768371b7f814388be714b91a0f
push id22465
push userbhackett@mozilla.com
push dateTue, 05 Feb 2013 16:45:15 +0000
treeherdermozilla-inbound@b757198a3ba3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs832670
milestone21.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 832670 - Don't verify barriers when unwinding frames that finished in JM, r=billm.
js/src/jit-test/tests/jaeger/bug832670.js
js/src/jsinterp.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/bug832670.js
@@ -0,0 +1,24 @@
+
+gczeal(4);
+eval("(function() { " + "\
+for ( var CHARCODE = 1024; CHARCODE < 65536; CHARCODE+= 1234 ) {\
+	unescape( '%u'+(ToUnicodeString(CHARCODE)).substring(0,3) )\
+}\
+function ToUnicodeString( n ) {\
+  var string = ToHexString(n);\
+  return string;\
+}\
+function ToHexString( n ) {\
+  var hex = new Array();\
+  for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) {}\
+  for ( index = 0, mag -= 1; mag > 0; index++, mag-- ) {\
+    hex[index] = Math.floor( n / Math.pow(16,mag) );\
+  var string ='';\
+      string <<=  'A';\
+      string += hex[index];\
+  }\
+  if ( 'var MYVAR=Number.NEGATIVE_INFINITY;MYVAR++;MYVAR' )\
+    string = '0' + string;\
+  return string;\
+}\
+" + " })();");
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -3329,25 +3329,26 @@ END_CASE(JSOP_ARRAYPUSH)
     if (cx->compartment->debugMode())
         interpReturnOK = ScriptDebugEpilogue(cx, regs.fp(), interpReturnOK);
     if (!regs.fp()->isYielding())
         regs.fp()->epilogue(cx);
     else
         Probes::exitScript(cx, script, script->function(), regs.fp());
     regs.fp()->setFinishedInInterpreter();
 
+    gc::MaybeVerifyBarriers(cx, true);
+
 #ifdef JS_METHODJIT
     /*
      * This path is used when it's guaranteed the method can be finished
      * inside the JIT.
      */
   leave_on_safe_point:
 #endif
 
-    gc::MaybeVerifyBarriers(cx, true);
     return interpReturnOK ? Interpret_Ok : Interpret_Error;
 }
 
 bool
 js::Throw(JSContext *cx, HandleValue v)
 {
     JS_ASSERT(!cx->isExceptionPending());
     cx->setPendingException(v);