summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineSink.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-05-03 21:54:28 -0700
committerFangrui Song <maskray@google.com>2020-05-03 22:06:33 -0700
commit8e7ae355ba97d6ac0020e11a0efeddc454b9f933 (patch)
treebcfadbac412e012e9ab6c30dfe5d790389581e77 /llvm/lib/CodeGen/MachineSink.cpp
parentd4d4c6bf834142326301a743d2939e868d9f0f0f (diff)
downloadbcm5719-llvm-8e7ae355ba97d6ac0020e11a0efeddc454b9f933.tar.gz
bcm5719-llvm-8e7ae355ba97d6ac0020e11a0efeddc454b9f933.zip
[llvm-objcopy] Avoid invalid Sec.Offset after D79229
To avoid undefined behavior caught by -fsanitize=undefined on binary-paddr.test void SectionWriter::visit(const Section &Sec) { if (Sec.Type != SHT_NOBITS) // Sec.Contents is empty while Sec.Offset may be out of bound llvm::copy(Sec.Contents, Out.getBufferStart() + Sec.Offset); } (cherry picked from commit 762fb1c40eea6878c2d6a1f0f1fc7915c8747981)
Diffstat (limited to 'llvm/lib/CodeGen/MachineSink.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud