projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initialize all bytes in vp data (msan error)
[oota-llvm.git]
/
lib
/
ProfileData
/
InstrProf.cpp
diff --git
a/lib/ProfileData/InstrProf.cpp
b/lib/ProfileData/InstrProf.cpp
index 723408b1c2ad4f89fa25026aa4d408d72a2f5beb..00c9057c8b45bf9437bbb0cc653202a78db7482e 100644
(file)
--- a/
lib/ProfileData/InstrProf.cpp
+++ b/
lib/ProfileData/InstrProf.cpp
@@
-211,8
+211,10
@@
uint64_t stringToHash(uint32_t ValueKind, uint64_t Value) {
}
ValueProfData *allocValueProfDataInstrProf(size_t TotalSizeInBytes) {
}
ValueProfData *allocValueProfDataInstrProf(size_t TotalSizeInBytes) {
- return (ValueProfData *)(new (::operator new(TotalSizeInBytes))
- ValueProfData());
+ ValueProfData *VD =
+ (ValueProfData *)(new (::operator new(TotalSizeInBytes)) ValueProfData());
+ memset(VD, 0, TotalSizeInBytes);
+ return VD;
}
static ValueProfRecordClosure InstrProfRecordClosure = {
}
static ValueProfRecordClosure InstrProfRecordClosure = {
@@
-223,8
+225,7
@@
static ValueProfRecordClosure InstrProfRecordClosure = {
getNumValueDataForSiteInstrProf,
stringToHash,
getValueForSiteInstrProf,
getNumValueDataForSiteInstrProf,
stringToHash,
getValueForSiteInstrProf,
- allocValueProfDataInstrProf
-};
+ allocValueProfDataInstrProf};
// Wrapper implementation using the closure mechanism.
uint32_t ValueProfData::getSize(const InstrProfRecord &Record) {
// Wrapper implementation using the closure mechanism.
uint32_t ValueProfData::getSize(const InstrProfRecord &Record) {