fix(ghidra): parse long procedure selectors without recursion

This commit is contained in:
morluto committed 2026-10-09 06:39:12 +08:00
1 parent e762e32afb
commit 480b16b9c1
3 files changed
+64 -4

No files matched your search

+19
View File
@@ -210,6 +210,24 @@ export async function verifyGhidraBoundaries(
entrypoint,
env,
});
const longSelector = "REA_MISSING_" + "x".repeat(32768);
for (const selected of [
longSelector,
`${longSelector}:0x1`,
`${"%78".repeat(12000)}:0x1`,
`${longSelector}%GG:0x1`,
]) {
await invalid(
"procedure_address",
{ procedure: selected },
/Unknown|invalid/u,
);
assert.equal(
await call("procedure_address", { procedure: address }),
address,
"Invalid selectors must preserve the live provider connection",
);
}
const baseline = await call("inspect_native_instruction", { address });
assert.equal(baseline.status, "decoded");
const bytes = await call("read_bytes", { address, length: baseline.length });
@@ -724,6 +742,7 @@ export async function verifyGhidraBoundaries(
equivalent_instruction_address_spellings: true,
qualified_annotation_name_roundtrip: true,
oversized_result_retention_and_complete_export: true,
long_selector_rejection_and_provider_recovery: true,
source_immutable: true,
reopen_discards_edits: true,
long_tmpdir_private_socket_cleanup: true,
@@ -82,7 +82,13 @@ export async function verifyGhidraNamespaceAnnotations({
}),
address,
);
for (const name of ["other::literal", `${namespace}::child::literal`]) {
for (const name of [
"other::literal",
`${namespace}::child::literal`,
"0xnothex",
"address%GG:0x1",
"address:0xnothex",
]) {
const literal = await call("annotate_native_function", {
procedure: address,
name,