generated from EmbarkStudios/opensource-template
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for testing the new vectored exception handling * Oops * Moar
- Loading branch information
1 parent
c61c72e
commit 603dcbb
Showing
11 changed files
with
109 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#![cfg(windows)] | ||
|
||
mod shared; | ||
|
||
#[test] | ||
fn handles_heap_corruption() { | ||
shared::handles_crash(shared::SadnessFlavor::HeapCorruption); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
output = "win_bindings.rs" | ||
binds = ["LoadLibraryA", "GetProcAddress", "GetProcessHeap", "HeapFree"] | ||
|
||
[bind-mode] | ||
mode = "minwin" | ||
|
||
[bind-mode.config] | ||
enum-style = "minwin" | ||
fix-naming = true | ||
use-rust-casing = true | ||
linking-style = "raw-dylib" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//! Bindings generated by `minwin` 0.1.0 | ||
#![allow( | ||
non_snake_case, | ||
non_upper_case_globals, | ||
non_camel_case_types, | ||
clippy::upper_case_acronyms | ||
)] | ||
#[link(name = "kernel32", kind = "raw-dylib")] | ||
extern "system" { | ||
#[link_name = "GetProcAddress"] | ||
pub fn get_proc_address(module: Hmodule, proc_name: Pcstr) -> Farproc; | ||
#[link_name = "GetProcessHeap"] | ||
pub fn get_process_heap() -> HeapHandle; | ||
#[link_name = "HeapFree"] | ||
pub fn heap_free( | ||
heap: HeapHandle, | ||
flags: HeapFlags::Enum, | ||
mem: *const ::core::ffi::c_void, | ||
) -> Bool; | ||
#[link_name = "LoadLibraryA"] | ||
pub fn load_library_a(lib_file_name: Pcstr) -> Hmodule; | ||
} | ||
pub type Bool = i32; | ||
pub type Farproc = ::core::option::Option<unsafe extern "system" fn() -> isize>; | ||
pub mod HeapFlags { | ||
pub type Enum = u32; | ||
} | ||
pub type HeapHandle = isize; | ||
pub type Hmodule = isize; | ||
pub type Pcstr = *const u8; |