summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-07-22 18:46:57 -0700
committerFangrui Song <maskray@google.com>2020-07-22 18:49:25 -0700
commit99ad956fdaee5398fdcf46fa49cb433cf52dc461 (patch)
treedbc524a9ad16244d337a923fd9d6c34327cf8869 /llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
parent9e4ab439c2ee415ef0f7b873ac25bbc63c2a4657 (diff)
[PGO] Don't call calloc(0, sizeof(ValueProfNode *))
A malloc implementation may return a pointer to some allocated space. It is undefined for libclang_rt.profile- to access the object - which actually happens in instrumentTargetValueImpl, where ValueCounters[CounterIndex] may access a ValueProfNode (from another allocated object) and crashes when the code accesses the object referenced by CurVNode->Next.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp')
0 files changed, 0 insertions, 0 deletions