[llvm-bugs] [Bug 31131] New: unsigned integer overflow in murmur2_or_cityhash<_Size, 64>::__hash_len_17_to_32

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 23 02:08:12 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=31131

            Bug ID: 31131
           Summary: unsigned integer overflow in
                    murmur2_or_cityhash<_Size, 64>::__hash_len_17_to_32
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gonzalobg88 at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

I am hitting a 

include/c++/v1/memory:3139:46: runtime error: unsigned integer overflow:
8751185004910830951 * 13011662864482103923 cannot be represented in type
'unsigned long'
SUMMARY: AddressSanitizer: undefined-behavior include/c++/v1/memory:3139:46 in 

The function seems to be: 

__murmur2_or_cityhash<_Size, 64>::__hash_len_17_to_32(const char *__s, _Size
__len).


Since it is a hash function, I would guess that the unsigned integer overflow
is intentional, and the signature is missing the:

_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK

annotation.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161123/6c1966e3/attachment.html>


More information about the llvm-bugs mailing list