mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Merge topic 'contour-bug-v1.7' into release-1.7
a195ce883 Fix Flying Edges z-boundary condition with non-square input Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Vicente Bolea <vicente.bolea@kitware.com> Merge-request: !2876
This commit is contained in:
commit
ca39bd4ea6
14
docs/changelog/flying-edges-z-boundary-fix.md
Normal file
14
docs/changelog/flying-edges-z-boundary-fix.md
Normal file
@ -0,0 +1,14 @@
|
||||
# Fixed Flying Edges Crash
|
||||
|
||||
There was a bug in VTK-m's flying edges algorithm (in the contour filter
|
||||
for uniform structured data) that cause the code to read an index from
|
||||
uninitialized memory. This in turn caused memory reads from an
|
||||
inappropriate address that could cause bad values, failed assertions, or
|
||||
segmentation faults.
|
||||
|
||||
The problem was caused by a misidentification of edges at the positive z
|
||||
boundary. Due to a typo, the z index was being compared to the length in
|
||||
the y dimension. Thus, the problem would only occur in the case where the y
|
||||
and z dimensions were of different sizes and the contour would go through
|
||||
the positive z boundary of the data, which was missing our test cases.
|
||||
|
@ -185,7 +185,7 @@ struct Pass4TrimState
|
||||
{
|
||||
boundaryStatus[AxisToSum::zindex] += FlyingEdges3D::MinBoundary;
|
||||
}
|
||||
if (ijk[AxisToSum::zindex] >= (pdims[AxisToSum::yindex] - 2))
|
||||
if (ijk[AxisToSum::zindex] >= (pdims[AxisToSum::zindex] - 2))
|
||||
{
|
||||
boundaryStatus[AxisToSum::zindex] += FlyingEdges3D::MaxBoundary;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user