mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-05 17:18:55 +00:00
Initialize all bytes in vp data (msan error)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
566a7b01a2
commit
7284c4e48d
@ -211,8 +211,10 @@ uint64_t stringToHash(uint32_t ValueKind, uint64_t Value) {
|
||||
}
|
||||
|
||||
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 = {
|
||||
@ -223,8 +225,7 @@ static ValueProfRecordClosure InstrProfRecordClosure = {
|
||||
getNumValueDataForSiteInstrProf,
|
||||
stringToHash,
|
||||
getValueForSiteInstrProf,
|
||||
allocValueProfDataInstrProf
|
||||
};
|
||||
allocValueProfDataInstrProf};
|
||||
|
||||
// Wrapper implementation using the closure mechanism.
|
||||
uint32_t ValueProfData::getSize(const InstrProfRecord &Record) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user