You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The miniz_oxide_c_api wrappers in src/lib.rs call println!("FATAL ERROR: Caught panic!"); when a panic is caught. println!() can panic if it fails to write, causing UB if panic = "abort" is not set. Replacing it with let _ = write!(io::stdout(), "FATAL ERROR: Caught panic!"); would make it ignore any write errors.
(As a side note, I tried to find any code paths that actually cause a panic, but could not find any. Is miniz_oxide designed to never panic in the absence of bugs?)
The text was updated successfully, but these errors were encountered:
Ah, should look at finding some other way to handle that then
And yeah miniz isn't designed to explicitly panic anywhere (though it's plausible that improper use of the unsafe c api bits could cause out of bounds panics or similar.)
The
miniz_oxide_c_api
wrappers insrc/lib.rs
callprintln!("FATAL ERROR: Caught panic!");
when a panic is caught.println!()
can panic if it fails to write, causing UB ifpanic = "abort"
is not set. Replacing it withlet _ = write!(io::stdout(), "FATAL ERROR: Caught panic!");
would make it ignore any write errors.(As a side note, I tried to find any code paths that actually cause a panic, but could not find any. Is
miniz_oxide
designed to never panic in the absence of bugs?)The text was updated successfully, but these errors were encountered: