[libcxx-commits] [libcxx] Fix typeinfo for undefined sanitizer (PR #121228)
Valery Mironov via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 9 15:13:20 PST 2025
MBkkt wrote:
I think the real issue is that when this function doesn't inline it is somehow ignore `-fno-sanitze=vptr`
https://android.googlesource.com/platform//external/v8/+/27d3291ef11ea9043d7b09525245fd30cd31b20d/tools/ubsan/vptr_blacklist.txt#9
and same for chromium.
Because according to my `compile_commands.json` I built without vptr this file (because using llvm-project cmake)
But it still failed with same issue (without provided patch)
I agree that my build is unusual, but I'm pretty sure this issue doesn't depend on anything except inline this function or not.
Maybe it's possible to easy reproduce this issue with making this function `no-inline` for ubsan build of libc++
```
{
"directory": "/xxx/build",
"command": "/usr/bin/clang++-18 -DHAVE___CXA_THREAD_ATEXIT_IMPL -DLIBCXX_BUILDING_LIBCXXABI -DNDEBUG -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS=\"\" -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCXXABI_BUILDING_LIBRARY -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/xxx/llvm/libunwind/include -I/xxx/llvm/libcxxabi/../libcxx/src -I/xxx/llvm/libcxxabi/include -isystem /xxx/build/llvm/runtimes/include/c++/v1 -fsized-deallocation -fvisibility-inlines-hidden -fno-omit-frame-pointer -O1 -fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all -fdiagnostics-color -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-limit-debug-info -g3 -fstandalone-debug -fdebug-macro -glldb -std=c++23 -nostdinc++ -fstrict-aliasing -funwind-tables -DNDEBUG -fvisibility=hidden -fvisibility-global-new-delete=force-hidden -o llvm/runtimes/libcxxabi/src/CMakeFiles/cxxabi_static_objects.dir/private_typeinfo.cpp.o -c /xxx/llvm/libcxxabi/src/private_typeinfo.cpp",
"file": "/xxx/llvm/libcxxabi/src/private_typeinfo.cpp",
"output": "llvm/runtimes/libcxxabi/src/CMakeFiles/cxxabi_static_objects.dir/private_typeinfo.cpp.o"
},
```
https://github.com/llvm/llvm-project/pull/121228
More information about the libcxx-commits
mailing list