[llvm] [DirectX][ObjectYAML] Fix SRCI round-trip tests that use zlib compression (PR #202479)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 14:47:43 PDT 2026


================
@@ -450,11 +450,6 @@ Error DXContainer::parseSourceInfo(StringRef Part) {
     return Err;
   Current += sizeof(SourceInfo->Parameters);
 
-  if (SourceInfo->Parameters.AlignedSizeInBytes != Part.size())
-    return parseFailed(formatv("size field in SRCI header ({0} bytes) does not "
-                               "match SRCI part size ({1} bytes)",
-                               SourceInfo->Parameters.AlignedSizeInBytes,
-                               Part.size()));
----------------
bogner wrote:

Should we change this to ensure that the actual size is less than or equal the allocated part size? I feel like this check was protecting against certain types of file corruption and removing it completely could go badly.

https://github.com/llvm/llvm-project/pull/202479


More information about the llvm-commits mailing list