LibAFL icon indicating copy to clipboard operation
LibAFL copied to clipboard

Do not use assert! in testcase_score

Open novafacing opened this issue 2 years ago • 3 comments

I don't know what I'm doing to trigger it, but:

https://github.com/AFLplusplus/LibAFL/blob/745326ee26236e2233e28a9f2f6e006d277a86f3/libafl/src/schedulers/testcase_score.rs#L342 is going off for seemingly no reason. Can we make this...not a hard assert, maybe switch it to a debug_assert!? There should probably not be assertions in a release build unless it's completely breaking...anyway, happens with all schedules, will update if I figure out why.

novafacing avatar Nov 03 '23 06:11 novafacing

is going off for seemingly no reason.

that does not sound good. what is the value of weight when it panicks? it is 0 or nan?

tokatoka avatar Nov 03 '23 12:11 tokatoka

i found a corner case path that leads to !weight.is_normal()

tokatoka avatar Feb 19 '24 20:02 tokatoka

let me know if this problem is still persistent after #1875

tokatoka avatar Feb 19 '24 20:02 tokatoka