summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BranchProbabilityInfo.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2019-11-26 18:18:14 -0800
committerPeter Collingbourne <peter@pcc.me.uk>2019-11-27 10:32:34 -0800
commitb208088a2111aeb805d0984a2ff86b3ce14c725a (patch)
tree115258b7999c9efe5f11178f994a72a3df8b2106 /llvm/lib/Analysis/BranchProbabilityInfo.cpp
parent6fd6cfdf72f9236520ac642e74cdb93d87532955 (diff)
downloadbcm5719-llvm-b208088a2111aeb805d0984a2ff86b3ce14c725a.tar.gz
bcm5719-llvm-b208088a2111aeb805d0984a2ff86b3ce14c725a.zip
scudo: Limit the number of bytes tested in a realloc test.
This test was previously effectively doing: P = malloc(X); write X bytes to P; P = realloc(P, X - Y); P = realloc(P, X) and expecting that all X bytes stored to P would still be identical after the final realloc. This happens to be true for the current scudo implementation of realloc, but is not guaranteed to be true by the C standard ("Any bytes in the new object beyond the size of the old object have indeterminate values."). This implementation detail will change with the new memory tagging support, which unconditionally zeros newly allocated granules when memory tagging is enabled. Fix this by limiting the number of bytes that we test to the minimum size that we realloc the allocation to. Differential Revision: https://reviews.llvm.org/D70761
Diffstat (limited to 'llvm/lib/Analysis/BranchProbabilityInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud