Hi, thanks for all the great code and the blog. While implementing the Michal-Harris list in C, I found a small mistake you have here:
|
next = curr->next.load(); |
The next = curr->next.load(); needs to be next = getUnmarked(curr)->next.load(); as it could be marked (leading to unaligned/invalid access to memory).
(Found the typo causing the double-frees.)
Hi, thanks for all the great code and the blog. While implementing the Michal-Harris list in C, I found a small mistake you have here:
OneFile/datastructures/linkedlists/MagedHarrisLinkedListSetHP.hpp
Line 230 in 4965489
The
next = curr->next.load();needs to benext = getUnmarked(curr)->next.load();as it could be marked (leading to unaligned/invalid access to memory).(Found the typo causing the double-frees.)