Skip to content

Commit 1600aa3

Browse files
committed
Fix bug where memory could be reset during cancellation, but host still tried to read returnvalue
Signed-off-by: Ludvig Liljenberg <[email protected]>
1 parent 118cb4e commit 1600aa3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/hyperlight_host/src/func/guest_dispatch.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ pub(crate) fn call_function_on_guest<WrapperGetterT: WrapperGetter>(
6767
timedout = true;
6868
match hv_handler.terminate_hypervisor_handler_execution_and_reinitialise(
6969
wrapper_getter.get_mgr_wrapper_mut().unwrap_mgr_mut(),
70-
)? {
71-
HyperlightError::HypervisorHandlerExecutionCancelAttemptOnFinishedExecution() =>
72-
{}
70+
) {
71+
Ok(
72+
HyperlightError::HypervisorHandlerExecutionCancelAttemptOnFinishedExecution(),
73+
) => {}
7374
// ^^^ do nothing, we just want to actually get the Flatbuffer return value
7475
// from shared memory in this case
75-
e => return Err(e),
76+
Ok(e) | Err(e) => return Err(e),
7677
}
7778
}
7879
e => return Err(e),

0 commit comments

Comments
 (0)