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