aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorquic-akaryaki <123192073+quic-akaryaki@users.noreply.github.com>2023-12-19 15:30:29 -0600
committerGitHub <noreply@github.com>2023-12-19 15:30:29 -0600
commit535520c6636f9a2bd7cd8fcb221e598a372cae9e (patch)
tree4125b9fd0f10c9f91a72a861f0c0aee0b8015ccc /llvm/lib/Support/CommandLine.cpp
parent52e7b6f5c52016708843a0881871958c7eb0c3d4 (diff)
downloadllvm-535520c6636f9a2bd7cd8fcb221e598a372cae9e.zip
llvm-535520c6636f9a2bd7cd8fcb221e598a372cae9e.tar.gz
llvm-535520c6636f9a2bd7cd8fcb221e598a372cae9e.tar.bz2
[llvm-objcopy] --gap-fill and 0-size sections (#75837)
In the change that added `--gap-fill`, the condition to choose the sections to write in `BinaryWriter::write()` did not exclude zero-size sections. However, zero-size sections did not have correct offsets assigned in `BinaryWriter::finalize()`. The result is either a failed assertion, or memory corruption due to writing to the buffer beyond its size. To fix this, exclude zero-size sections from writing. Also, add a zero-size section to the test, which would trigger the problem.
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions