Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion crates/wdk-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ mod macros;
#[no_mangle]
pub static _fltused: () = ();

// FIXME: Is there any way to avoid this stub? See https://github.com/rust-lang/rust/issues/101134
// FIXME: Is there any way to avoid these stubs? See https://github.com/rust-lang/rust/issues/101134
#[cfg(panic = "abort")]
#[allow(missing_docs)]
#[allow(clippy::missing_const_for_fn)] // const extern is not yet supported: https://github.com/rust-lang/rust/issues/64926
Expand All @@ -129,6 +129,29 @@ pub extern "system" fn __CxxFrameHandler3() -> i32 {
0
}

#[cfg(panic = "abort")]
#[allow(missing_docs)]
#[allow(clippy::missing_const_for_fn)] // const extern is not yet supported: https://github.com/rust-lang/rust/issues/64926
Comment thread
wmmc88 marked this conversation as resolved.
Outdated
#[no_mangle]
pub extern "system" fn __CxxFrameHandler4() -> i32 {
// This is a stub for the C++ exception handling frame handler. It's never
// called but it needs to be distinct from __CxxFrameHandler3 to not confuse
// binary analysis tools. We return a different value to prevent folding.
1
}

#[cfg(panic = "abort")]
#[allow(missing_docs)]
#[allow(clippy::missing_const_for_fn)] // const extern is not yet supported: https://github.com/rust-lang/rust/issues/64926
#[no_mangle]
pub extern "system" fn __GSHandlerCheck_EH4() -> i32 {
// This is a stub for the C++ exception handling frame handler. It's never
// called but it needs to be distinct from __CxxFrameHandler3 and
// __CxxFrameHandler4 to not confuse binary analysis tools. We return a
// different value to prevent folding.
2
}

#[cfg(any(
driver_model__driver_type = "WDM",
driver_model__driver_type = "KMDF",
Expand Down
Loading