Bug 1245152 - Ensure enough ballast space in ::CloneForDeadBranches. r=h4writer
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Thu, 11 Feb 2016 17:50:53 +0000
changeset 320341 2e543fbdce6f12abf4b745583faf571b853b8c78
parent 320340 632547643a7496a752b1ef5044bc4a225becb38a
child 320342 d8c6f0bce77b785f18e12fb182d79acc8e75bf6b
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1245152
milestone47.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 1245152 - Ensure enough ballast space in ::CloneForDeadBranches. r=h4writer
js/src/jit/RangeAnalysis.cpp
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -2777,16 +2777,18 @@ static bool
 CloneForDeadBranches(TempAllocator& alloc, MInstruction* candidate)
 {
     // Compare returns a boolean so it doesn't have to be recovered on bailout
     // because the output would remain correct.
     if (candidate->isCompare())
         return true;
 
     MOZ_ASSERT(candidate->canClone());
+    if (!alloc.ensureBallast())
+        return false;
 
     MDefinitionVector operands(alloc);
     size_t end = candidate->numOperands();
     if (!operands.reserve(end))
         return false;
     for (size_t i = 0; i < end; ++i)
         operands.infallibleAppend(candidate->getOperand(i));