This is an archive of the discontinued LLVM Phabricator instance.

Fix downcasts of unaligned empty/tombstone DenseMap keys for DenseMap<AssertVH<T>, Foo>.
ClosedPublic

Authored by samsonov on Aug 19 2014, 1:30 PM.

Diff Detail

Event Timeline

samsonov updated this revision to Diff 12680.Aug 19 2014, 1:30 PM
samsonov retitled this revision from to Use properly aligned pointers for empty/tombstone DenseMap keys..
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added reviewers: rsmith, chandlerc.
samsonov added a subscriber: Unknown Object (MLST).
samsonov abandoned this revision.Aug 28 2014, 1:37 PM
samsonov reclaimed this revision.
samsonov updated this revision to Diff 13057.Aug 28 2014, 1:40 PM

Implement a limited fix to the problem, suggested by Richard Smith:
redefine DenseMapInfo<AssertingVH<T>>::isEqual to ensure it doesn't
perform pointer downcasts: fake pointer values for empty/tombstone keys
may not be properly aligned.

samsonov retitled this revision from Use properly aligned pointers for empty/tombstone DenseMap keys. to Fix downcasts of unaligned empty/tombstone DenseMap keys for DenseMap<AssertVH<T>, Foo>..Aug 28 2014, 1:41 PM
samsonov updated this object.
rsmith accepted this revision.Sep 2 2014, 6:26 PM
rsmith edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 2 2014, 6:26 PM
samsonov closed this revision.Sep 3 2014, 11:21 AM