fix(il2cpp): reject module image references outside retained inventory (#8956)

This commit is contained in:
Jiabin Yin authored and GitHub committed 2026-11-05 18:33:36 +08:00
1 parent 4362a0848e
commit da79ea0baa
3 files changed
+103

No files matched your search

+8
View File
@@ -444,6 +444,14 @@ const validateMetadataFacts = (
"Type reference is outside the linked type table or names an unavailable type.",
});
});
report.binary?.code_gen_modules.forEach((row, index) => {
if (row.image >= report.images.length)
context.addIssue({
code: "custom",
path: ["binary", "code_gen_modules", index, "image"],
message: "Code-generation module image is outside the retained images.",
});
});
report.method_addresses?.forEach((row, index) => {
if (codeRowContradicts(row, report.binary?.image_base))
context.addIssue({