-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault for remove_vertex
with adjacency_list<boost::setS, ...>
#268
Comments
Revert change to `reindex_edge_list`. See boostorg#268 .
Hello all, I am facing the exact same issue as the one reported here. Just curious to know what the current status is? It seems that the underlying problem is well understood, and a possible solution has been suggested. Is it expected that it will be solved any time soon, or are there other problems (that I am not aware of) that block its resolution? Any feedback is greatly appreciated. Thanks. |
This will be a priority to fix once the CI is fixed. |
The fix is now on |
Bug description
Removing a vertex in an
adjacency_list
graph produces an invalid read when the following conditions are metOutEdgeList
issetS
orhash_setS
VertexList
isvecS
Reproducing MWE
The following code:
On MacOS Big Sur, this results in a segfault in roughly 1/1000 iterations. This could be reproduced both with
AppleClang 12.0.5.12050022
andLLVM Clang 12.0.0
. On Linux with gcc, no segfault was observed but the memory corruption can be observed in Valgrind (see output).Proposed fix
Reverting commit 5dd748307cc35e8 seems to fix the issue. The issue seems to come from incrementing an invalid iterator after a change to the original container.
The text was updated successfully, but these errors were encountered: