[PATCH] D158725: [NFC][AMDGPU] Guard the custom fixups kind array from invalid access
Luke Drummond via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 30 03:13:15 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG05637256005b: [NFC][AMDGPU] Guard the custom fixups kind array from invalid access (authored by gmirazchiyski, committed by ldrumm).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158725/new/
https://reviews.llvm.org/D158725
Files:
llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
Index: llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
+++ llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
@@ -185,6 +185,8 @@
if (Kind < FirstTargetFixupKind)
return MCAsmBackend::getFixupKindInfo(Kind);
+ assert(unsigned(Kind - FirstTargetFixupKind) < getNumFixupKinds() &&
+ "Invalid kind!");
return Infos[Kind - FirstTargetFixupKind];
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158725.554654.patch
Type: text/x-patch
Size: 513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230830/508519c6/attachment.bin>
More information about the llvm-commits
mailing list