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.
[tests] [lucet-runtime] port remaining top-level tests to C API
This required some shenanigans with the probestack definition to get it exported in the final `lucet_runtime.so`. I left a TODO in the code to revert it once [this Rust issue](https://github.com/rust-lang/rust/issues/36342) is fixed.
- Loading branch information
Showing
13 changed files
with
193 additions
and
244 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
11 changes: 10 additions & 1 deletion
11
lucet-runtime/lucet-runtime-internals/src/probestack/mod.rs
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 |
---|---|---|
@@ -1,4 +1,13 @@ | ||
extern "C" { | ||
pub fn lucet_probestack(); | ||
pub fn lucet_probestack_private(); | ||
pub static lucet_probestack_size: u32; | ||
} | ||
|
||
#[no_mangle] | ||
pub unsafe extern "C" fn lucet_probestack() { | ||
// TODO: this is a hack to make sure the symbol `lucet_probestack` is exported in | ||
// `lucet_runtime.so`: see https://github.com/rust-lang/rust/issues/36342. As soon as that issue | ||
// is resolved, we should remove this to avoid any safety issues around the weird probestack | ||
// calling convention, and to avoid the overhead of an additional function call. | ||
lucet_probestack_private() | ||
} |
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
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
Oops, something went wrong.