mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 787921 - Fix IonMonkey interrupt detection. r=dvander
This commit is contained in:
parent
516460a8dc
commit
723d6c73f7
@ -101,8 +101,8 @@ CheckOverRecursed(JSContext *cx)
|
||||
// (1) The interrupt bit is set, and we need to fire the interrupt callback.
|
||||
// (2) The stack limit has been exceeded, and we need to throw an error.
|
||||
//
|
||||
// Note that we can reach here if ionStackLimit is NULL, but interrupt has
|
||||
// not yet been set to 1. That's okay; it will be set to 1 very shortly,
|
||||
// Note that we can reach here if ionStackLimit is MAXADDR, but interrupt
|
||||
// has not yet been set to 1. That's okay; it will be set to 1 very shortly,
|
||||
// and in the interim we might just fire a few useless calls to
|
||||
// CheckOverRecursed.
|
||||
JS_CHECK_RECURSION(cx, return false);
|
||||
|
13
js/src/jit-test/tests/ion/bug787921.js
Normal file
13
js/src/jit-test/tests/ion/bug787921.js
Normal file
@ -0,0 +1,13 @@
|
||||
// |jit-test| error: InternalError: too much recursion
|
||||
function TestCase(n, d, e, a) {
|
||||
this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : '';
|
||||
this.type = (typeof window == 'undefined' ? 'shell' : 'browser');
|
||||
gTestcases[gTc++] = this;
|
||||
if (optionName && optionName != "allow_xml") {}
|
||||
{} {} {} // Seems to be required to crash
|
||||
}
|
||||
function f() {}
|
||||
function g(n, h) {
|
||||
var t = g(TestCase.toSource());
|
||||
}
|
||||
g(80, f);
|
@ -169,9 +169,9 @@ JSRuntime::triggerOperationCallback()
|
||||
* Invalidate ionTop to trigger its over-recursion check. Note this must be
|
||||
* set before interrupt, to avoid racing with js_InvokeOperationCallback,
|
||||
* into a weird state where interrupt is stuck at 0 but ionStackLimit is
|
||||
* NULL.
|
||||
* MAXADDR.
|
||||
*/
|
||||
ionStackLimit = 0;
|
||||
ionStackLimit = -1;
|
||||
|
||||
/*
|
||||
* Use JS_ATOMIC_SET in the hope that it ensures the write will become
|
||||
|
Loading…
Reference in New Issue
Block a user