Closed Koral77 closed 1 year ago
Thanks for filing an issue!
This particular behavior is expected, although we could maybe have a better panic message and need to add a section to the docs explaining that this can happen.
One can use try_with_capacity
to handle OOM.
Can you share the fuzz target you've written? Could be good to get cargo fuzz
fuzz targets committed in the repo, but I'm also just curious about the approach you've taken.
@fitzgen Thanks for your reply!
I place the replay code on replay_files.
The file contains three lines of code, but the bug is triggered in the first line of code.
The reported bug is in lib.rs: 468 where the code is
It uses unwrap()
on Err
returned by Layout::from_size_align
.
I've using afl.rs to fuzz this crate. And I found a panic issue. The code to replay the issue is
And from the panic reportn, it seems that this panic is caused by use unwrap on a Result which may return err. I hope you can check if this is a bug need to be fixed. Thanks a lot.