Skip to content

Commit 6ed08ab

Browse files
committed
Add missing MAX_FLAT_PARAMS check in flatten_functype
1 parent 957e51e commit 6ed08ab

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

design/mvp/CanonicalABI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2466,6 +2466,8 @@ def flatten_functype(opts, ft, context):
24662466
else:
24672467
match context:
24682468
case 'lift':
2469+
if len(flat_params) > MAX_FLAT_PARAMS:
2470+
flat_params = ['i32']
24692471
if opts.callback:
24702472
flat_results = ['i32']
24712473
else:

design/mvp/canonical-abi/definitions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,8 @@ def flatten_functype(opts, ft, context):
15411541
else:
15421542
match context:
15431543
case 'lift':
1544+
if len(flat_params) > MAX_FLAT_PARAMS:
1545+
flat_params = ['i32']
15441546
if opts.callback:
15451547
flat_results = ['i32']
15461548
else:

0 commit comments

Comments
 (0)