Describe the Bug
|
pub unsafe fn install_fatal_error_handler(handler: extern "C" fn(*const ::libc::c_char)) { |
This function is unsound, unless the error handler calls abort. If the error handler panics, then the panic will unwind into the C++ stack frames, which is unsound and would cause undefined behavior.
I'm not entirely sure if we can make this sound. We can notify users of the behavior and tell them that they should abort and not return from the function.
Describe the Bug
inkwell/src/support/error_handling.rs
Line 26 in e44cdb9
This function is unsound, unless the error handler calls
abort. If the error handler panics, then the panic will unwind into the C++ stack frames, which is unsound and would cause undefined behavior.I'm not entirely sure if we can make this sound. We can notify users of the behavior and tell them that they should abort and not return from the function.