mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 10:35:42 +00:00
aaf49915e0
There was a bug with Flying Edges checking the boundary conditions in the z-direction. It was comparing the z index to the size of the y dimension, not the z dimension. This simple typo was probably missed because most of the tests use square meshes. To catch the problem, you need a mesh that has a different number of points in the y and z directions and the contour has to go past the positive z boundary. When this error was hit, the indices for the edges on that boundary were not recorded, and later interpolation used garbage values for edge's point ids.
15 lines
698 B
Markdown
15 lines
698 B
Markdown
# 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.
|
|
|