mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 866888 part 3 - Fix bailout overrecursion check. r=djvj
This commit is contained in:
parent
ec0d5ce176
commit
6732c0fc47
@ -1243,10 +1243,12 @@ ion::BailoutIonToBaseline(JSContext *cx, JitActivation *activation, IonBailoutIt
|
||||
|
||||
// Do stack check.
|
||||
bool overRecursed = false;
|
||||
JS_CHECK_RECURSION_WITH_EXTRA_DONT_REPORT(cx, info->copyStackTop - info->copyStackBottom,
|
||||
overRecursed = true);
|
||||
if (overRecursed)
|
||||
uint8_t *newsp = info->incomingStack - (info->copyStackTop - info->copyStackBottom);
|
||||
JS_CHECK_RECURSION_WITH_SP_DONT_REPORT(cx, newsp, overRecursed = true);
|
||||
if (overRecursed) {
|
||||
IonSpew(IonSpew_BaselineBailouts, " Overrecursion check failed!");
|
||||
return BAILOUT_RETURN_OVERRECURSED;
|
||||
}
|
||||
|
||||
info->bailoutKind = bailoutKind;
|
||||
*bailoutInfo = info;
|
||||
|
@ -638,12 +638,9 @@ GetNativeStackLimit(JSContext *cx)
|
||||
} \
|
||||
JS_END_MACRO
|
||||
|
||||
#define JS_CHECK_RECURSION_WITH_EXTRA_DONT_REPORT(cx, extra, onerror) \
|
||||
#define JS_CHECK_RECURSION_WITH_SP_DONT_REPORT(cx, sp, onerror) \
|
||||
JS_BEGIN_MACRO \
|
||||
uint8_t stackDummy_; \
|
||||
if (!JS_CHECK_STACK_SIZE(js::GetNativeStackLimit(cx), \
|
||||
&stackDummy_ - (extra))) \
|
||||
{ \
|
||||
if (!JS_CHECK_STACK_SIZE(js::GetNativeStackLimit(cx), sp)) { \
|
||||
onerror; \
|
||||
} \
|
||||
JS_END_MACRO
|
||||
|
Loading…
Reference in New Issue
Block a user