diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2016-01-11 19:27:10 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2016-01-11 19:27:10 +0000 |
commit | 7a3731f82b60dd1a9483cd94c712a3a1cd2e87a4 (patch) | |
tree | 527db9ace00ebc0e21be31fe11882c9109eae5db /include/memory | |
parent | 4c7ee806f5c9862017b0f1659bb5aabc03f6a215 (diff) |
Preemptively disable unsigned integer sanitization in 32 and 64 bit versions of __murmur2_or_cityhash. This lets people use the unsigned integer overflow checker in UBSAN w/o getting hits from libc++'s hash code (where the unsigned integer overflow is legal and deliberate)> Patch by @danielaustin. Reviewed as: http://reviews.llvm.org/D15973
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@257368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/memory')
-rw-r--r-- | include/memory | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/memory b/include/memory index 65369d263..3ef687c17 100644 --- a/include/memory +++ b/include/memory @@ -3194,7 +3194,7 @@ struct __murmur2_or_cityhash<_Size, 32> // murmur2 template <class _Size> _Size -__murmur2_or_cityhash<_Size, 32>::operator()(const void* __key, _Size __len) +__murmur2_or_cityhash<_Size, 32>::operator()(const void* __key, _Size __len) _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK { const _Size __m = 0x5bd1e995; const _Size __r = 24; @@ -3344,7 +3344,7 @@ struct __murmur2_or_cityhash<_Size, 64> // cityhash64 template <class _Size> _Size -__murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len) +__murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len) _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK { const char* __s = static_cast<const char*>(__key); if (__len <= 32) { |