[llvm-bugs] [Bug 30613] New: std::type_info::hash_code violates strict aliasing

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 4 13:16:48 PDT 2016


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

            Bug ID: 30613
           Summary: std::type_info::hash_code violates strict aliasing
           Product: libc++abi
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: rjmccall at apple.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
    Classification: Unclassified

Noticed by inspection.  It reinterpret_casts the name field to size_t* and
dereferences that instead of just reinterpret_casting the name value to size_t.
 There doesn't seem to be any good reason for it.

type_info fields are always immutable, so there's zero chance of this causing
any real problems, but it's easy to fix.

-- 
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/20161004/0d56a35a/attachment.html>


More information about the llvm-bugs mailing list