Closed robomics closed 2 years ago
Thanks for finding this! Turns out we were missing the logic for copying a bucket_container
after it had been deallocated (in which case the copied container should also be "deallocated"). Fixed in cff72f146687b4252e771c5de69c4f4e2a85abac.
Thanks for the quick fix!
Would you mind making a release/tag the latest commit?
About a week ago I submitted a package for libcuckoo to Conan (link), and they require a tagged version to submit/update a package.
No problem, just added a tag for v0.3.1
here: https://github.com/efficient/libcuckoo/releases/tag/v0.3.1.
The following code snipped (which is a slight modification of the
hellohash
example) causes a SEGV when $iters \ge 327672$Compiling the code with ASAN reveals that the segfaults happens at bucker_container.hh:328 when checking if a bucket is occupied.
I am afraid I know too little about libcuckoo internals to further debug this issue, but I couldn't help to notice that $\frac{327672 + 8}{8192} = 40$.
All the above was tested on a Linux machine, compiling the code with gcc 12.1.0 and clang 13.0.1.
ASAN backtrace
``` Testing w/ iters=327670... OK! Testing w/ iters=327671... OK! Testing w/ iters=327672...AddressSanitizer:DEADLYSIGNAL ================================================================= ==3158150==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000a4 (pc 0x5588b53274fd bp 0x7fffb7de0e20 sp 0x7fffb7de0d10 T0) ==3158150==The signal is caused by a READ memory access. ==3158150==Hint: address points to the zero page. #0 0x5588b53274fd in libcuckoo::bucket_container