Skip to content

Commit

Permalink
reserve some additional space for function activation frame in instru…
Browse files Browse the repository at this point in the history
…mentation (near#8823)

This is a carryover from near#8323
  • Loading branch information
Ekleog-NEAR authored and nikurt committed Apr 5, 2023
1 parent 0928393 commit 39744ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/near-vm/lib/api/src/sys/tunables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ impl finite_wasm::max_stack::SizeConfig for SimpleMaxStackCfg {
let mut res = 0;
res += locals.max_index().map_or(0, |l| u64::from(*l).saturating_add(1)) * 8;
// TODO: make the above take into account the types of locals by adding an iter on PrefixSumVec that returns (count, type)
res += 32; // Rough accounting for rip, rbp and some registers spilled. Not exact.
res += 64; // Rough accounting for rip, rbp and some registers spilled. Not exact.
res
}
}
Expand Down

0 comments on commit 39744ba

Please sign in to comment.