[libcxx-commits] [libcxx] r353448 - Add UBSAN annotation to __hash_table::rehash; we don't do anything wrong, but UBSAN's checker flags it as suspicious. See PR38606. NFC

Marshall Clow via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 7 10:53:59 PST 2019


Author: marshall
Date: Thu Feb  7 10:53:58 2019
New Revision: 353448

URL: http://llvm.org/viewvc/llvm-project?rev=353448&view=rev
Log:
Add UBSAN annotation to __hash_table::rehash; we don't do anything wrong, but UBSAN's checker flags it as suspicious. See PR38606. NFC

Modified:
    libcxx/trunk/include/__hash_table

Modified: libcxx/trunk/include/__hash_table
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__hash_table?rev=353448&r1=353447&r2=353448&view=diff
==============================================================================
--- libcxx/trunk/include/__hash_table (original)
+++ libcxx/trunk/include/__hash_table Thu Feb  7 10:53:58 2019
@@ -2371,6 +2371,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 void
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::rehash(size_type __n)
+_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 {
     if (__n == 1)
         __n = 2;




More information about the libcxx-commits mailing list