Skip to content

Avoid integer overflow when clipping large volumes.

Steven Hahn requested to merge quantumsteve/vtk:integer_overflow into master

I encountered a segmentation fault when attempting to clip a stack of tiffs (vtkImageData) in ParaView and, using the undefined behavior sanitizer, tracked it down to integer overflow. The changes below change some values from int to vtkIdType to avoid that.

This python script reproduces the issue. It runs without issue on this branch but causes a segmentation fault on master. It does use a lot of memory and I haven't tried it on a machine with less than 128 GB RAM.

Merge request reports