File tree Expand file tree Collapse file tree
crates/wasmi/src/engine/executor/handler Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1162,7 +1162,10 @@ impl ValueStack {
11621162 self . grow_if_needed ( end) ?;
11631163 let start_locals = start. into_inner ( ) . wrapping_add ( len_params) ;
11641164 let end_locals = start. into_inner ( ) . wrapping_add ( len_local_slots) ;
1165- self . cells [ start_locals..end_locals] . fill_with ( Cell :: default) ;
1165+ let Some ( local_cells) = self . cells . get_mut ( start_locals..end_locals) else {
1166+ unsafe { unreachable_unchecked ! ( ) }
1167+ } ;
1168+ local_cells. fill_with ( Cell :: default) ;
11661169 let sp = self . sp ( start) ;
11671170 Ok ( sp)
11681171 }
@@ -1191,7 +1194,10 @@ impl ValueStack {
11911194 unsafe { unreachable_unchecked ! ( "ValueStack::replace: out of bounds callee cells" ) }
11921195 } ;
11931196 callee_cells. copy_within ( params_start..params_end, 0 ) ;
1194- callee_cells[ params_len..callee_locals] . fill_with ( Cell :: default) ;
1197+ let Some ( local_cells) = callee_cells. get_mut ( params_len..callee_locals) else {
1198+ unsafe { unreachable_unchecked ! ( ) }
1199+ } ;
1200+ local_cells. fill_with ( Cell :: default) ;
11951201 let sp = self . sp ( callee_start) ;
11961202 Ok ( sp)
11971203 }
You can’t perform that action at this time.
0 commit comments