-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
Description
CALLF
/JUMPF
requires number of target inputs for stack overflow check, becausemax_stack_height
definition includes function inputs, and we need to subtract them not to double count.
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 at CALLF
/JUMPF
: it only needs to access the new value.