mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 01:46:39 +00:00
fix(rizin): keep the selected executable when the command fails to start
When the command failed to start after identification, for example with E2BIG, the error kept the provider, the resolved path, the digest and the banner, but not the executable the caller selected. Evidence records it as provider_executable, and only the ENOENT launch branch carried it as command; an E2BIG resource constraint carries just argument_bytes, so a bare alias or configured path was lost. The retained diagnostics now include provider_executable beside the lookup, hash and probe facts.
This commit is contained in:
1 parent
c602ea1186
commit
7a003942a8
3 files changed
+6
-2
No files matched your search
@@ -126,7 +126,8 @@ that answers. Each call therefore launches the executable twice, the probe and
|
||||
then the command. If the command then fails to start, for example with `E2BIG`
|
||||
because its arguments exceed the host's launch limit, the call returns no
|
||||
Evidence; the error's `details.diagnostics` keep `provider`, the tool and
|
||||
version, and the `provider_*` parameters above. A probe that is cancelled, or
|
||||
version, the selected `provider_executable`, and the `provider_*` parameters
|
||||
above. A probe that is cancelled, or
|
||||
whose cleanup is incomplete, keeps the executable path and SHA-256 there; a hash
|
||||
that is cancelled or reaches the deadline keeps the executable path; and a lookup
|
||||
that is cancelled or reaches the deadline keeps the path it was checking, as
|
||||
|
||||
@@ -694,10 +694,12 @@ export class ReverseEngineeringService {
|
||||
}
|
||||
if (earlyFailure !== undefined) {
|
||||
// Without command output there is no Evidence to carry what the lookup,
|
||||
// hash and probe observed, so the failure keeps it.
|
||||
// hash and probe observed, so the failure keeps it beside the
|
||||
// executable the caller selected.
|
||||
if (identification.observed)
|
||||
earlyFailure.retainDiagnostics({
|
||||
provider: identification.identity,
|
||||
provider_executable: command,
|
||||
...identification.parameters,
|
||||
});
|
||||
return err(this.#registerCleanupFailure(earlyFailure, cleanupOwner));
|
||||
|
||||
@@ -203,6 +203,7 @@ it("keeps the probe's identification when the command then fails to start", asyn
|
||||
details: {
|
||||
diagnostics: {
|
||||
...scenario.diagnostics,
|
||||
provider_executable: "rizin",
|
||||
provider_executable_path: executable,
|
||||
provider_executable_sha256: digest,
|
||||
provider_version_banner: scenario.banner,
|
||||
|
||||
Reference in new issue
Block a user