This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lucet-runtime] implement counter for unwinding nested hostcalls
This doesn't work yet, because the prologue for guest functions is trying to push a frame pointer. At least in the new test added in this commit, the value of `rbp` at entry to the callback `guest_func` is zero, which screws up how the debugger (and presumably the unwinding runtime) interpret the stack.
- Loading branch information
Showing
7 changed files
with
142 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
lucet-runtime/lucet-runtime-tests/guests/host/hostcall_nested_error_unwind.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <stddef.h> | ||
|
||
extern void hostcall_test_func_hostcall_nested_error_unwind1(void (*)(void)); | ||
extern void hostcall_test_func_hostcall_nested_error_unwind2(void); | ||
|
||
void guest_func(void) { | ||
hostcall_test_func_hostcall_nested_error_unwind2(); | ||
} | ||
|
||
int main(void) | ||
{ | ||
hostcall_test_func_hostcall_nested_error_unwind1(guest_func); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters