Open cheako opened 2 years ago
This is only called from within Rust so never crosses the FFI barrier and is caught by the rust runtime. But I am not sure if this is already UB because it is inside an extern block 🤔 .
It's not clear to me whether this counts. https://doc.rust-lang.org/nomicon/ffi.html just says "across an FFI boundary." https://doc.rust-lang.org/reference/items/external-blocks.html does not mention panics/unwinding at all AFAICT. https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html#changes-to-the-behavior-of-existing-abi-strings says:
Prior to this RFC, any unwinding operation that crossed an extern "C" boundary, either from a panic! "escaping" from a Rust function defined with extern "C" or by entering Rust from another language via an entrypoint declared with extern "C", caused undefined behavior.
but it's not clear to me if that's normative.
https://github.com/MaikKlein/ash/blob/b7aff3b432d853528a47bf99fa3e7f0d841c4112/ash/src/vk/features.rs#L87
These should be
eprintln!
followed byprocess::exit
.