Skip to content

Modify max_stack_height of type section #134

@chfast

Description

@chfast

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.

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions