-
Notifications
You must be signed in to change notification settings - Fork 86
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
boost.lockfree tagged_ptr conflict with Hardware-assisted AddressSanitizer(HWASan) from LLVM project #70
Comments
do aarch64 have any form of double-width compare and swap? disabling the ptrcompression would probably result in using 128bit atomics, which would have to be emulated by using locks (with all the side effects that one could not use the data structures in shared memory for example). would it be possible to simply exclude the ptrcompression code from hwasan via compiler attributes? |
@timblechmann thanks your reply.
|
interesting. i don't have access to any armv8.1 (just a rpi4, which seems to be armv8.0). could you try to change https://github.com/boostorg/lockfree/blob/develop/include/boost/lockfree/detail/prefix.hpp#L26 to disable pointer compression for arm 8.1.0 and check it the atomics are lockfree? also i wonder if there are any performance implications that may favour pointer compression with 64bit cas over 128 cas ... |
@timblechmann I can't identify minor version "x" of armv8.x, maybe I only disable pointer compression for hwasan test |
As we know, boost using tagged_ptr avoid CAS ABA issue. But in aarch64, tagged_ptr_ptrcompression using top bits of pointer, but HWASan also using top bits of pointer, so conflict.
HWASan help detect memory bugs in LLVM project, so should boost lockfree compat HWASan ?
The text was updated successfully, but these errors were encountered: