Frommi / miniz_oxide

Rust replacement for miniz
MIT License
179 stars 49 forks source link

Some Panics cause segfaults in jemalloc when called from flate2 #14

Closed oyvindln closed 5 years ago

oyvindln commented 6 years ago

Ideally we should never panic of course, but there could still be bugs, and if there are, it shouldn't end up in a segfault. See this I've tried with removing no_mangle and extern_c from mz_inflate, so that doesn't seem to be the issue.

Shnatsel commented 5 years ago

Is this what #36 is supposed to fix?

oyvindln commented 5 years ago

I don't know if that was background for it, but it may be related yea. It's something that needs to be sorted in either case. Ideally we woulldn't go through the C Api for flate2 (#16). Going through a C API will always require unsafe.

The project got a bit stalled, but I at least want to look into this again. Would be nice to have some more eyes and help on this though :)

oyvindln commented 5 years ago

I couldn't reproduce this with the current code, so this may have been fixed as of now, but I'll do some more testing before closing.

oyvindln commented 5 years ago

Closing this for now since the C api is no longer used and I haven't been able to reproduce this.

oyvindln commented 5 years ago

Forgot to actually click close..