Closed w41ter closed 5 years ago
$ uname -a Linux Desktop 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux $ clang++ --version clang version 5.0.0-3~16.04.1 (tags/RELEASE_500/final) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin
when compile with -fsanitize=undefined to check undefined behaviour, throws:
-fsanitize=undefined
include/libcuckoo/cuckoohash_map.hh:762:5: runtime error: constructor call on misaligned address 0x7f3776070010 for type 'cuckoohash_map<std::__1::basic_string<char>, std::__1::basic_string<char>, std::__1::hash<std::__1::basic_string<char> >, std::__1::equal_to<std::__1::basic_string<char> >, std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>, std::__1::basic_string<char> > >, 4>::spinlock *', which requires 64 byte alignment 0x7f3776070010: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Thanks for investigating! I think this is a duplicate of #53. The fix would be to use an aligned allocator for spinlocks.
Closing as this is a duplicate of #53.
when compile with
-fsanitize=undefined
to check undefined behaviour, throws: