Fix unaligned memory read issue exposed by ubsan
authorXinliang David Li <davidxl@google.com>
Tue, 17 Nov 2015 03:47:21 +0000 (03:47 +0000)
committerXinliang David Li <davidxl@google.com>
Tue, 17 Nov 2015 03:47:21 +0000 (03:47 +0000)
commit4d60f67763b08c19335b29e96a61ad4cbce034d9
treeaebb961302b595a6a5bf0a53181ed3a6e5633086
parent15d19608b087c452ba9d28bafa268426e7f6fab9
Fix unaligned memory read issue exposed by ubsan

Indexed profile data as designed today does not guarantee
counter data to be well aligned, so reading needs to use
the slower form (with memcpy). This is less than ideal and
should be improved in the future (i.e., with fixed length
function key instead of variable length name key).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253309 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ProfileData/InstrProf.cpp