(_args: SigsegvArgs, _vm: &VirtualMachine)
| 1206 | |
| 1207 | #[pyfunction] |
| 1208 | fn _sigsegv(_args: SigsegvArgs, _vm: &VirtualMachine) { |
| 1209 | #[cfg(not(target_arch = "wasm32"))] |
| 1210 | { |
| 1211 | suppress_crash_report(); |
| 1212 | |
| 1213 | // Write to NULL pointer to trigger a real hardware SIGSEGV, |
| 1214 | // matching CPython's *((volatile int *)NULL) = 0; |
| 1215 | // Using raise(SIGSEGV) doesn't work reliably because Rust's runtime |
| 1216 | // installs its own signal handler that may swallow software signals. |
| 1217 | unsafe { |
| 1218 | let ptr: *mut i32 = core::ptr::null_mut(); |
| 1219 | core::ptr::write_volatile(ptr, 0); |
| 1220 | } |
| 1221 | } |
| 1222 | } |
| 1223 | |
| 1224 | #[pyfunction] |
| 1225 | fn _sigabrt(_vm: &VirtualMachine) { |
nothing calls this directly
no test coverage detected