-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fuzz testing #3
Comments
@ericfischer with the latest fixes are you still seeing any polygons that don't finish/hang? With the fuzzer port to mapnik-vt (https://github.com/mapbox/mapnik-vector-tile/blob/master/bin/vtile-fuzz.cpp) I'm not. Also I originally only saw crashes and no hangs. |
Thanks @springmeyer. I did just get it to crash on this fuzz polygon but haven't looked into what exactly went wrong yet. In general it seems to take O(n^4) time with the number of sides, so it can get slow, but I haven't seen it fail to complete. |
@ericfischer - interesting. Would it be possible to capture the |
I got it to crash again, this time in the debugger, and it was here:
I'll start logging the random seed for easier reproducibility. |
Here's a reliable crasher, with
|
@ericfischer - your fuzzer uses 3 |
@ericfischer when you've got the |
I'm not sure quite what you are asking, @springmeyer. The code linked above that crashes calls
Here is a list of the values that |
And the difference between this and your fuzzer, in addition to all the looping over various options that you do, is that it looks like you have an extra check to close the ring when it gets to have 100 points in it, which reduces the level of complexity that Clipper is asked to handle. |
@ericfischer I found the bug in the code -- it should be fixed in 9edc292 |
Thanks @flippmoke! It's looking good to me. |
@flippmoke As we briefly discussed yesterday, I wrote a quick fuzz-testing program to generate random terrible polygons and see how long it takes Clipper to handle them.
Many of the random polygons take 20 or more seconds to complete and some look like they never will. A typical stack trace (from this polygon) when interrupted looks like this:
It's not checking whether the output seems reasonable, only if it completes at all.
The text was updated successfully, but these errors were encountered: