Skip to content

Commit b46da12

Browse files
committed
[hyperlight_guest_bin] Pop error code on context restore
Previously, we did remove the error code from the stack before `iret`'ing, which resulted in the return failing. Signed-off-by: Lucy Menon <168595099+syntactically@users.noreply.github.com>
1 parent 6295bec commit b46da12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hyperlight_guest_bin/src/exceptions/interrupt_entry.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ macro_rules! generate_exceptions {
123123
" mov rdi, rsp\n",
124124
" call {hl_exception_handler}\n",
125125
context_restore!(),
126-
" iretq\n", // iretq is used to return from exception in x86_64
126+
" add rsp, 8\n", // error code
127+
" iretq\n", // iretq is used to return from exception in x86_64
127128
generate_excp!(0, pusherrcode),
128129
generate_excp!(1, pusherrcode),
129130
generate_excp!(2, pusherrcode),

0 commit comments

Comments
 (0)