You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CALLF/JUMPF requires number of target inputs for stack overflow check, because max_stack_height definition includes function inputs, and we need to subtract them not to double count.
The third value of the type section entry (after number of inputs, number of outputs) should be "max stack height above the inputs". This eliminates "double counting" as you can notice in the current spec that the max_stack_height >= num_inputs. This also simplifies the runtime stack overflow check at CALLF/JUMPF: it only needs to access the new value.
The text was updated successfully, but these errors were encountered:
When last discussed (discord), this fell into the "too late" department. Andrei suggested a name max_stack_increase back then, I think renaming would indeed be necessary, otherwise max_stack_height == 0 and inputs > 0 is weird.
Barring the lateness argument, and assuming we rename the field, this sounds like a positive change.
Originally posted by @gumb0 in #39 (comment)
The third value of the type section entry (after number of inputs, number of outputs) should be "max stack height above the inputs". This eliminates "double counting" as you can notice in the current spec that the
max_stack_height >= num_inputs
. This also simplifies the runtime stack overflow check atCALLF
/JUMPF
: it only needs to access the new value.The text was updated successfully, but these errors were encountered: