This is an archive of the discontinued LLVM Phabricator instance.

Fix ubsan error in ValueMap
AbandonedPublic

Authored by arsenm on Nov 6 2014, 1:27 PM.

Details

Reviewers
rsmith
Summary

Fixes "llvm/IR/ValueMap.h:210:65: runtime error: upcast of misaligned address 0xfffffffffffffffc for type 'llvm::AllocaInst', which requires 8 byte alignment
0xfffffffffffffffc: note: pointer points here"

Diff Detail

Event Timeline

arsenm updated this revision to Diff 15890.Nov 6 2014, 1:27 PM
arsenm retitled this revision from to Fix ubsan error in ValueMap.
arsenm updated this object.
arsenm edited the test plan for this revision. (Show Details)
arsenm added a reviewer: rsmith.
arsenm added a subscriber: Unknown Object (MLST).

How about adding a private ValueMapCallbackVH constructor, that takes a single llvm::Value *. It would be only used to create "fake" ValueMapCallbackVH for empty/tombstone keys in DenseMapInfo<>.

Losing compile-time check that static_cast<> enforces would be unfortunate.

arsenm abandoned this revision.Jan 9 2015, 1:40 PM

This appear to be obsoleted by D6903