summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InstructionSimplify.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2018-10-09 21:41:53 +0000
committerRui Ueyama <ruiu@google.com>2018-10-09 21:41:53 +0000
commit2b53b4bea611824a933123780357b5a2cbe2ed0f (patch)
tree71930dec4687c3b669f24e445d7caeedff10edf4 /llvm/lib/Analysis/InstructionSimplify.cpp
parente9ca7ea3e5c0f3e155fc7b47cb9068a2f12cae6a (diff)
downloadbcm5719-llvm-2b53b4bea611824a933123780357b5a2cbe2ed0f.tar.gz
bcm5719-llvm-2b53b4bea611824a933123780357b5a2cbe2ed0f.zip
Attempt to fix ubsan.
Previously, we cast a pointer to Elf{32,64}_Chdr like this auto *Hdr = reinterpret_cast<const ELF64_Chdr>(Ptr); and read from its members like this read32(&Hdr->ch_size); I was thinking that this does not violate alignment requirement, since &Hdr->ch_size doesn't really access memory, but seems like it is a violation in terms of C++ spec (?) In this patch, I use a different struct that allows unaligned access. llvm-svn: 344083
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud