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:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user