Quadratic cell point array (ab)use
In my attempted refactor of the
quadraticEvaluation test, it exposed some memory shenanigans being performed within some cell types (no guarantee that this is an exhaustive list, just what AddressSanitizer/valgrind/glibc/gdb end up witnessing):
The patterns seems to be that the cell assumes that it "owns" the point array and resizes it on its own internally to store extra data (e.g., a center point). However, the point array can be some larger-scale storage of point data and all accesses should be mediated via the
PointIds array. Any extra points needed should be stored locally within the class explicitly rather than trying to (ab)use direct access to the point array.
Exposed in refactoring of
quadraticEvaluation in ben.boeckel/vtk@03ab8364