Skip to main content

Module backtrace

Module backtrace 

Source
Expand description

Configurable panic hook for miniextendr-based R packages.

The hook is process-global (std::panic::set_hook writes to a process slot), but its closure lives in the DLL’s code. If the package is unloaded (e.g. library.dynam.unload / dyn.unload) without removing the hook, the next panic anywhere in the process jumps to unmapped memory and tears down the SEH state on Windows — surfacing as “failed to initiate panic, error 5” in the next DLL that tries to unwind (#277).

miniextendr_panic_hook() installs; miniextendr_panic_hook_uninstall() takes it back off. Both are idempotent and paired by the init / unload code in worker.rs.

Statics§

INSTALLED 🔒
True iff this DLL instance has installed the panic hook.

Functions§

miniextendr_panic_hook
Register the miniextendr panic hook.
miniextendr_panic_hook_uninstall 🔒
Remove the miniextendr panic hook and revert to Rust’s default.