Closed milianw closed 3 years ago
FTR, the bug seems to have suddenly vanished on my system, see also the upstream report over at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102984
I still think that this patch is fine though, as it simplifies the code to achieve the same
Thanks for the fix! Agree the code looks cleaner regardless of whether or not the UBSAN issue occurs. I would have expected the stack-allocated spinlock that's passed into the constructor to be properly aligned, but maybe not?
Do not create
spinlock()
default arguments when initializing locks_t. Instead, use the two-arg std::vector constructor which will do the same in-place. This work-arounds the UBSAN alignment warnings such as:Fixes: https://github.com/efficient/libcuckoo/issues/53