You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Clear abort buffer on each function call
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
* Add artificial test
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
---------
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/hyperlight_host/src/sandbox/initialized_multi_use.rs
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -733,6 +733,9 @@ impl MultiUseSandbox {
733
733
}
734
734
})();
735
735
736
+
// Clear partial abort bytes so they don't leak across calls.
737
+
self.mem_mgr.abort_buffer.clear();
738
+
736
739
// In the happy path we do not need to clear io-buffers from the host because:
737
740
// - the serialized guest function call is zeroed out by the guest during deserialization, see call to `try_pop_shared_input_data_into::<FunctionCall>()`
738
741
// - the serialized guest function result is zeroed out by us (the host) during deserialization, see `get_guest_function_call_result`
@@ -1464,6 +1467,33 @@ mod tests {
1464
1467
);
1465
1468
}
1466
1469
1470
+
/// Test that stale abort buffer bytes from a previous call don't
0 commit comments