[llvm-bugs] [Bug 31764] New: DenseMapInfo for PointerEmbeddedInt runs afoul of assertions
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jan 25 17:13:53 PST 2017
https://llvm.org/bugs/show_bug.cgi?id=31764
Bug ID: 31764
Summary: DenseMapInfo for PointerEmbeddedInt runs afoul of
assertions
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Support Libraries
Assignee: unassignedbugs at nondot.org
Reporter: jordan_rose at apple.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
The DenseMapInfo for PointerEmbeddedInt looks like this:
static inline T getEmptyKey() { return IntInfo::getEmptyKey(); }
static inline T getTombstoneKey() { return IntInfo::getTombstoneKey(); }
But the empty and tombstone values for a pointer-sized integer are likely out
of range for a PointerEmbeddedInt, which means we immediately get assertion
failures when DenseMap tries to use these values. At the very least we should
be truncating the right number of bits; a more holistic solution would allow
DenseMap to store a different representation than the formal key type.
--
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/20170126/04963c5d/attachment.html>
More information about the llvm-bugs
mailing list