mirror of
https://github.com/corda/corda.git
synced 2024-12-28 16:58:55 +00:00
fix stack overflow calculation
This commit is contained in:
parent
dc8232eddf
commit
6678d31d5c
@ -4642,8 +4642,10 @@ run(Thread* t)
|
|||||||
} else {
|
} else {
|
||||||
unsigned parameterFootprint = methodParameterFootprint(t, code);
|
unsigned parameterFootprint = methodParameterFootprint(t, code);
|
||||||
unsigned base = sp - parameterFootprint;
|
unsigned base = sp - parameterFootprint;
|
||||||
if (UNLIKELY(codeMaxStack(t, methodCode(t, code))
|
if (UNLIKELY(base
|
||||||
+ codeMaxLocals(t, methodCode(t, code)) + base
|
+ codeMaxLocals(t, methodCode(t, code))
|
||||||
|
+ FrameFootprint
|
||||||
|
+ codeMaxStack(t, methodCode(t, code))
|
||||||
> Thread::StackSizeInWords / 2))
|
> Thread::StackSizeInWords / 2))
|
||||||
{
|
{
|
||||||
exception = makeStackOverflowError(t);
|
exception = makeStackOverflowError(t);
|
||||||
|
Loading…
Reference in New Issue
Block a user