Open
Description
Do I need a TypeSanitizer instrumented libc++ and libc++abi? Is there something equivalent to LLVM_USE_SANITIZER=MemoryWithOrigins
? LLVM_USE_SANITIZER=Type
maybe?
The build appears to be running protoc here and erroring out.
=96490==ERROR: TypeSanitizer: type-aliasing-violation on address 0x7ff7b73e8170 (pc 0x000108f38825 bp 0x7ff7b73e8110 sp 0x7ff7b73e80a0 tid 5397290)
READ of size 8 at 0x7ff7b73e8170 with type long partially accesses an object of type int that starts at offset 6
#0 0x000108f38824 in unsigned long std::__1::__loadword[abi:ne200100]<unsigned long>(void const*)+0x514 (protoc-3.21.12.0:x86_64+0x100430824)
#1 0x000108f36643 in std::__1::__murmur2_or_cityhash<unsigned long, 64ul>::__hash_len_33_to_64[abi:ne200100](char const*, unsigned long)+0x5e63 (protoc-3.21.12.0:x86_64+0x10042e643)
#2 0x000108f20ce2 in std::__1::__murmur2_or_cityhash<unsigned long, 64ul>::operator()[abi:ne200100](void const*, unsigned long) const+0x2052 (protoc-3.21.12.0:x86_64+0x100418ce2)
#3 0x000108f1ec7e in unsigned long std::__1::__do_string_hash[abi:ne200100]<char const*>(char const*, char const*)+0x91e (protoc-3.21.12.0:x86_64+0x100416c7e)
#4 0x000108f1e33a in std::__1::__string_hash<char, std::__1::allocator<char>>::operator()[abi:ne200100](std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) const+0xa9a (protoc-3.21.12.0:x86_64+0x10041633a)
#5 0x00010d5ab492 in std::__1::__unordered_map_hasher<std::__1::basic_string<char,
....
I tried ignoring the base function calls (i.e. ProtobufMain
, or even google::protobuf*
), but that doesn't appear to work.
cat ~/.tsan-ignorelist
fun:google::protobuf::*
These errors are similar to what happens with the MemorySanitizer if I don't build and link against custom instrumented C++ C++ABI libraries.