diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h index db3ecc32503b..beb995085f6c 100644 --- a/js/src/jit/arm/Assembler-arm.h +++ b/js/src/jit/arm/Assembler-arm.h @@ -1303,12 +1303,17 @@ class Assembler void initWithAllocator() { m_buffer.initWithAllocator(); + // Note that the sizes for the double pools are set to 1020 rather than 1024 to + // work around a rare edge case that would otherwise bail out - which is not + // possible for Asm.js code and causes a compilation failure. See the comment at + // the fail_bail call within IonAssemberBufferWithConstantPools.h: finishPool(). + // Set up the backwards double region - new (&pools_[2]) Pool (1024, 8, 4, 8, 8, m_buffer.LifoAlloc_, true); + new (&pools_[2]) Pool (1020, 8, 4, 8, 8, m_buffer.LifoAlloc_, true); // Set up the backwards 32 bit region new (&pools_[3]) Pool (4096, 4, 4, 8, 4, m_buffer.LifoAlloc_, true, true); // Set up the forwards double region - new (doublePool) Pool (1024, 8, 4, 8, 8, m_buffer.LifoAlloc_, false, false, &pools_[2]); + new (doublePool) Pool (1020, 8, 4, 8, 8, m_buffer.LifoAlloc_, false, false, &pools_[2]); // Set up the forwards 32 bit region new (int32Pool) Pool (4096, 4, 4, 8, 4, m_buffer.LifoAlloc_, false, true, &pools_[3]); for (int i = 0; i < 4; i++) {