fix(dotnet): validate managed metadata and CIL boundaries (#938)

* perf(dotnet): reuse decoded metadata rows

* test(dotnet): preserve expanded fixture metadata

* style(dotnet): format metadata inventory

* fix(dotnet): bound method bodies to PE section data

* fix(dotnet): derive fixture metadata index widths

* fix(dotnet): validate managed metadata bounds

* test(dotnet): cover large metadata ReadyToRun layout

* fix(dotnet): validate exception instruction boundaries

* fix(dotnet): report invalid metadata coded indexes

* fix(dotnet): clarify MemberForwarded null diagnostics

* fix(dotnet): honor complete CIL and EH boundaries

* fix(dotnet): validate metadata identity rows and offsets
This commit is contained in:
morluto
2026-10-08 00:17:26 +08:00
committed by GitHub
parent 35a4e18d30
commit bda4ada7fb
18 changed files with 1825 additions and 223 deletions
+3 -1
View File
@@ -156,6 +156,7 @@ export const inspectManagedNativeBoundariesBytes = (
});
}
const heapExtent = Math.max(layout.strings.size, layout.blob.size);
const issues = [...inventory.issues];
const moduleRefs = parseModuleRefs(bytes, layout, heapExtent);
const members = new Map([
...parseFields(bytes, layout, heapExtent),
@@ -167,6 +168,7 @@ export const inspectManagedNativeBoundariesBytes = (
heapExtent,
modules: moduleRefs,
members,
issues,
});
const pinvokeTokens = new Set(
imports
@@ -187,6 +189,6 @@ export const inspectManagedNativeBoundariesBytes = (
imports,
implementations,
native: cliNative(pe),
issues: [],
issues,
});
};