diff options
| author | Fangrui Song <i@maskray.me> | 2025-08-01 00:31:51 -0700 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2025-08-01 00:31:51 -0700 |
| commit | 491c7bdd5887ea4561b6cbfc07a8ca4a140e871d (patch) | |
| tree | c4ca479e3b0aaa6f124334ac9fc52554b3a12e14 /llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | |
| parent | 228e96b28a84828e1720c387a339a7e68dbdc029 (diff) | |
MCAsmBackend::applyFixup: Replace Data.getSize() with F.getSize()
to facilitate replacing `MutableArrayRef<char> Data` (fragment content)
with the relocated location. This is necessary to fix the
pointer-overflow sanitizer issue and reland #150846
Diffstat (limited to 'llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp index 146fc6704c6d..dfa3de3c3ade 100644 --- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp +++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp @@ -1125,7 +1125,7 @@ void ARMAsmBackend::applyFixup(const MCFragment &F, const MCFixup &Fixup, const unsigned NumBytes = getFixupKindNumBytes(Kind); unsigned Offset = Fixup.getOffset(); - assert(Offset + NumBytes <= Data.size() && "Invalid fixup offset!"); + assert(Offset + NumBytes <= F.getSize() && "Invalid fixup offset!"); // Used to point to big endian bytes. unsigned FullSizeBytes; |
