You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably there should never be double free C++ errors, regardless of the input data, if the memory handling is safe throughout the library and its dependency stack.
Here is a reproducer using nothing more than NumPy, pytest, and the hypothesis[numpy] property-based testing library:
Run the test below with version 1.0 of memsurfer with: pytest reproducer.py -s
importnumpyasnpimportmemsurferimporthypothesisfromhypothesisimportgivenfromhypothesisimportstrategiesasstfromhypothesis.extraimportnumpyashynp@given(# generate the leaflet coordshynp.arrays(np.float64, (100, 3)),# and the box coordshynp.arrays(np.float64, (2, 3)), # and the resnameshynp.arrays(np.str_, 100), )deftest_memsurfer_double_free(leaflet_coords, bbox, labels):
# this test causes memsurfer or one of its# dependencies to produce C++ "double free"# errorsmemsurfer.Membrane.compute(leaflet_coords,
labels=labels,
bbox=bbox,
periodic=False)
@tylerjereddy , thanks for opening the issue and @ctlee , thanks for connecting it with the pypoisson issue.
There appears to be a memory bug in the original code for python reconstruction that slips through the cracks in older compilers, but it appears that gcc>8 is not letting it through. I spent quite some time digging down the cause, and I suspect really fixing it requires an overhaul of the original cpp code (see my comment here.)
Until then, I tried the code again with gcc@7.5.0 and I was able to successfully run.
I will leave this issue open but add to ReadMe the need to stick with gcc@7 until someone figures this out.
Probably there should never be
double free
C++ errors, regardless of the input data, if the memory handling is safe throughout the library and its dependency stack.Here is a reproducer using nothing more than NumPy,
pytest
, and thehypothesis[numpy]
property-based testing library:Run the test below with version
1.0
ofmemsurfer
with:pytest reproducer.py -s
It will hard crash:
The text was updated successfully, but these errors were encountered: