[llvm] [DirectX] adding support to read/write descriptor table data using obj2yaml/yaml2obj (PR #138315)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 11:34:15 PDT 2025
================
@@ -228,6 +273,19 @@ class RootSignature {
else
DataSize = sizeof(dxbc::RTS0::v2::RootDescriptor);
break;
+ case dxbc::RootParameterType::DescriptorTable:
+ uint32_t NumRanges =
+ support::endian::read<uint32_t, llvm::endianness::little>(
+ PartData.begin() + Header.ParameterOffset);
----------------
joaosaffran wrote:
We don't handle this case while reading the root signature part, not sure if there is validation process before reading the parts.
What will happen is: in case of absurdly larger numbers, invalid data would be read, since this would overflow the section containing descriptor ranges, and it would likely crash due to access out of bounds sections.
https://github.com/llvm/llvm-project/pull/138315
More information about the llvm-commits
mailing list