mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
Bug 673068 - Tweak HitStackQuota call to placate stack sanity assertions (r=dvander)
--HG-- extra : rebase_source : 7701b293fd87534ffbafb7a5eebca6515d17e334
This commit is contained in:
parent
4917275e1c
commit
c0b3b2d367
12
js/src/jit-test/tests/basic/testBug673068.js
Normal file
12
js/src/jit-test/tests/basic/testBug673068.js
Normal file
@ -0,0 +1,12 @@
|
||||
// |jit-test| mjitalways
|
||||
|
||||
function f(x) {
|
||||
var x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10;
|
||||
var y0, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10;
|
||||
var z0, z1, z2, z3, z4, z5, z6, z7, z8, z9, z10;
|
||||
if (x == 0)
|
||||
return;
|
||||
f(x - 1);
|
||||
}
|
||||
|
||||
f(1000);
|
@ -332,10 +332,16 @@ mjit::Compiler::generatePrologue()
|
||||
Jump stackCheck = masm.branchPtr(Assembler::AboveOrEqual, Registers::ReturnReg,
|
||||
FrameAddress(offsetof(VMFrame, stackLimit)));
|
||||
|
||||
/* If the stack check fails... */
|
||||
/*
|
||||
* If the stack check fails then we need to either commit more of the
|
||||
* reserved stack space or throw an error. Specify that the number of
|
||||
* local slots is 0 (instead of the default script->nfixed) since the
|
||||
* range [fp->slots(), fp->base()) may not be commited. (The calling
|
||||
* contract requires only that the caller has reserved space for fp.)
|
||||
*/
|
||||
{
|
||||
stubcc.linkExitDirect(stackCheck, stubcc.masm.label());
|
||||
OOL_STUBCALL(stubs::HitStackQuota);
|
||||
OOL_STUBCALL_LOCAL_SLOTS(stubs::HitStackQuota, 0);
|
||||
stubcc.crossJump(stubcc.masm.jump(), masm.label());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user