fix(il2cpp): report the exceeded native-link maximum in the public refusal (#10741)

* fix(il2cpp): report the exceeded native-link maximum in the public refusal

* fix(il2cpp): report each native-link budget's maximum in the unit its producer counts

* refactor(elf): report pointer relocation failures through ParseFailure (#10748)
This commit is contained in:
morluto authored and GitHub committed 2026-11-15 13:44:54 +08:00
1 parent ad6e27e256
commit a090fa7098
13 files changed
+124 -29

No files matched your search

+11 -2
View File
@@ -83,12 +83,21 @@ const failureForPrimary = (
const { cause, origin } = facts;
if (origin === "owned-or-classified" && cause instanceof AnalysisError)
return cause;
if (cause instanceof Il2cppBinaryFormatFailure && cause.kind === "limit")
if (
cause instanceof Il2cppBinaryFormatFailure &&
cause.failure.kind === "limit"
)
return new AnalysisResourceConstraintError(
OPERATION,
cause.reason === "native-type-text-capacity" ? "memory" : "capacity",
cause.message,
{},
// The producing site states what its maximum counts.
{
boundary: cause.reason,
...(cause.unit === undefined
? {}
: { [`maximum_${cause.unit}`]: cause.failure.limit.maximum }),
},
{
cause,
...fixedAllowanceOptions(