[INFER] Fix assertion failure, bug 673705. r=bhackett
authorShu-yu Guo <shu@rfrn.org>
Mon, 25 Jul 2011 11:02:44 -0700
changeset 76070 62f32efb087c7213d5d86580ed0cccc782268a74
parent 76069 7e5a5d2e28f86a93c36b8473591411c212be870f
child 76076 bd40ad1be9d889e3323adda04bb74f6d31bcedb3
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersbhackett
bugs673705
milestone8.0a1
[INFER] Fix assertion failure, bug 673705. r=bhackett
js/src/jit-test/tests/basic/bug673705.js
js/src/jsanalyze.cpp
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug673705.js
@@ -0,0 +1,10 @@
+function bug673705() {
+  var x;
+  try {
+  } catch (e) {
+  } finally {
+    print(x);
+  }
+  return x;
+}
+assertEq(bug673705(), undefined);
--- a/js/src/jsanalyze.cpp
+++ b/js/src/jsanalyze.cpp
@@ -1242,17 +1242,17 @@ ScriptAnalysis::extendVariable(JSContext
         }
     }
 }
 
 inline void
 ScriptAnalysis::ensureVariable(LifetimeVariable &var, unsigned until)
 {
     JS_ASSERT(var.lifetime);
-    JS_ASSERT(until < var.lifetime->start);
+    JS_ASSERT(until <= var.lifetime->start);
     var.lifetime->start = until;
     var.ensured = true;
 }
 
 void
 ScriptAnalysis::clearAllocations()
 {
     /*