Deltares / numba_celltree

Celltree data structure for searching for points, lines, boxes, and cells (convex polygons) in a two dimensional unstructured mesh.
https://deltares.github.io/numba_celltree/
MIT License
11 stars 3 forks source link

Numba celltree crashes due to out-of-bounds array access of statically sized stack #22

Closed smknaake closed 2 weeks ago

smknaake commented 3 weeks ago

Using xugrid.OverlapRegridder throws IndexError with mapbox_earcut triangle results from polygons.

Throws: IndexError: index 128 is out of bounds for axis 0 with size 128 which is caused by a pre-allocated array.

Huite commented 3 weeks ago

Should be fixed by #23

I did a quick benchmark as in #13, checking size seems to make no noticeable difference; and re-allocations will generally be rare.