We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60df4ba commit 1ea5134Copy full SHA for 1ea5134
crates/wasmi/src/engine/executor/handler/state.rs
@@ -380,6 +380,11 @@ pub struct ValueStack {
380
381
impl ValueStack {
382
fn new(min_height: usize, max_height: usize) -> Self {
383
+ // We need to convert from `size_of<Cell>`` to `size_of<u8>`:
384
+ debug_assert!(min_height <= max_height);
385
+ let sizeof_cell = mem::size_of::<UntypedVal>();
386
+ let min_height = min_height / sizeof_cell;
387
+ let max_height = max_height / sizeof_cell;
388
let cells = Vec::with_capacity(min_height);
389
Self { cells, max_height }
390
}
0 commit comments