[compiler-rt] [CFI] update ignorelist to work with libstdc++ make_shared (PR #118599)
Wu Yingcong via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 21:33:38 PST 2024
yingcong-wu wrote:
> Is the correct fix really to just add an allow-list for individual cases of valid code? Doesn't that imply a problem with the sanitizer, or is that by design?
Here is the same problem for libc++: https://bugs.llvm.org/show_bug.cgi?id=48993, and it ends up adding `_LIBCPP_NO_CFI` for it as well, which is not much different than what we do here.
The key problem about this kind of problem is (taken from the LLVM bugzilla) "CFI detects cast confusion bugs by checking that the vtable is correct for the type of the cast, but the vptr slot is still uninitialized.".
I think adding a suppression is the right way here.
> If you add a suppression for __aligned_member as well as __aligned_buffer then that should help the libstdc++ std::list case (and std::set, std::map etc. in libstdc++). It won't help cases like the x::buffer example though.
Do you want me to include those in this PR?
https://github.com/llvm/llvm-project/pull/118599
More information about the llvm-commits
mailing list