Open Heroglyph opened 2 years ago
The endless recursion is likely a symptom of i8
's shrinker yielding the original value. See #295 for a related issue.Could you check whether #296 resolves your issue?
I checked by trying the current BurntShushi:master and neithernut:i32min-shrink-bound (revision 0c279d6). The latter revision (yours), fixed the issue, so merging the pull request should resolve my problem. Thank you!
MWE:
I think that quickcheck tests this function with the smallest integer, which panics because it cannot be negated due to two's complement. So far, so correct. The resulting panic is then caught and correctly interpreted to be caused by a failed test. However, attempting to shrink the value causes another panic, which causes another attempt at shrinking, causing another panic and so on, ultimately resulting in a stack overflow as the shrinking functions pile on top of each other. This seems to be a bug in the way that shrinking is done (because it keeps testing the same value). How do we proceed?