File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -647,7 +647,9 @@ impl<'engine> EngineExecutor<'engine> {
647647 Results : CallResults ,
648648 {
649649 self . stack . reset ( ) ;
650- self . stack . values . extend ( params. call_params ( ) ) ;
650+ let call_params = params. call_params ( ) ;
651+ self . stack . values . reserve ( call_params. len ( ) ) ?;
652+ self . stack . values . extend ( call_params) ;
651653 match ctx. as_context ( ) . store . inner . resolve_func ( func) {
652654 FuncEntity :: Wasm ( wasm_func) => {
653655 self . stack
@@ -689,7 +691,9 @@ impl<'engine> EngineExecutor<'engine> {
689691 self . stack
690692 . values
691693 . drop ( host_func. ty ( ctx. as_context ( ) ) . params ( ) . len ( ) ) ;
692- self . stack . values . extend ( params. call_params ( ) ) ;
694+ let call_params = params. call_params ( ) ;
695+ self . stack . values . reserve ( call_params. len ( ) ) ?;
696+ self . stack . values . extend ( call_params) ;
693697 assert ! (
694698 self . stack. frames. peek( ) . is_some( ) ,
695699 "a frame must be on the call stack upon resumption"
You can’t perform that action at this time.
0 commit comments