mirror of
https://github.com/morluto/rea.git
synced 2026-11-15 19:23:24 +00:00
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:
1 parent
ad6e27e256
commit
a090fa7098
13 files changed
+124
-29
No files matched your search
@@ -94,6 +94,7 @@ export function* openImageSteps(image: Buffer): Generator<void, NativeImage> {
|
||||
"native-index-capacity",
|
||||
cause.message,
|
||||
cause.failure.limit.maximum,
|
||||
"bytes",
|
||||
);
|
||||
if (cause instanceof BinaryFormatFailure)
|
||||
throw new Il2cppBinaryFormatFailure(
|
||||
@@ -126,14 +127,15 @@ export function* openImageSteps(image: Buffer): Generator<void, NativeImage> {
|
||||
);
|
||||
} catch (cause) {
|
||||
if (cause instanceof ElfPointerRelocationFailure) {
|
||||
if (cause.failure.kind === "limit" && cause.unit !== undefined)
|
||||
throw new Il2cppBinaryFormatFailure(
|
||||
"native-index-capacity",
|
||||
cause.message,
|
||||
cause.failure.limit.maximum,
|
||||
cause.unit,
|
||||
);
|
||||
if (cause.reason !== "native-index-capacity")
|
||||
throw new Il2cppBinaryFormatFailure(cause.reason, cause.message);
|
||||
if (cause.maximum !== undefined)
|
||||
throw new Il2cppBinaryFormatFailure(
|
||||
cause.reason,
|
||||
cause.message,
|
||||
cause.maximum,
|
||||
);
|
||||
}
|
||||
if (cause instanceof BinaryFormatFailure)
|
||||
throw new Il2cppBinaryFormatFailure("malformed-container", cause.message);
|
||||
|
||||
Reference in new issue
Block a user