- Trim horizontal trailing whitespace in `GdbSession::exec`'s `until` check (`result_record(line.trim_end())`) so it matches `absorb`'s record detection while keeping meaningful trailing spaces in `target_output`.
- Pin exact `\n`/`\r`/`\t` and three-digit octal output in `quote`, CRLF stripping in `drain`, and bounded queue polling before `take_output` in `gdb::tests`.
- Escape `\n`, `\r`, `\t`, and remaining control characters (as fixed three-digit octal byte escapes) in `quote`, and decode standard C escapes (`\a`, `\b`, `\f`, `\v`) plus `\xHH` hex byte escapes in `unquote` so console commands and stderr log lines stay single-line MI records and round-trip cleanly.
- Clamp unmatched closing braces and brackets at nesting depth zero in `fields` so malformed tuple delimiters outside quotes cannot hide subsequent top-level MI fields such as `reason`.
- Normalize CRLF line endings in `drain` and pass `expected_token` to `absorb` so late or untokenized result records from other commands cannot taint `c.result` or `c.error`, while clearing stale errors on non-error records in `take_output` and still recording `^exit`.
A page that opened an alert while loading waited for someone to close
it, and nothing did, so the open always ran into its deadline. Alerts
and beforeunload are accepted so the page can go on; confirm and
prompt are dismissed so nothing is agreed to for the person. The
result says which dialogs the page opened and how each was answered.
Fixes#2010
Co-Authored-By: htjulia <htjulia1@gmail.com>
A path set in Settings → Engines counted as found whenever it existed, so a JDK's folder set for the Java runtime was listed as installed and then run as a program ("permission denied"). A folder is now looked in the way an install folder is, newest version first with digit runs compared as numbers; a folder without the program isn't found, and the message names the folder.
Follow-up to #1949. A script that runs the headless launcher is kept as the launcher even when it sits in Ghidra's own folder, so what it sets up (its Java, say) isn't dropped. A path a start script names is also followed through its links, so a script that runs a linked ghidraRun leads to the Ghidra folder.
Engine downloads (Ghidra and its JDK, Godot, pinned installs) used only the proxy environment variables, so behind a VPN that sets only the Windows system proxy they went direct and timed out. When no proxy variable is set, they now use the person's manual proxy from Windows' settings, read from the registry once per download; this computer and Windows' own exceptions go direct, and a NO_PROXY the person set replaces those exceptions. Settings with credentials, SOCKS only or no port are ignored. AI clients are unchanged. Not run behind a real system proxy. Fixes#1827, #1787.
A local MCP plugin that exited before answering only said "The X plugin exited." It now gives its exit code and the last lines it printed, and a write to a server that has already gone gives the same error. When a local plugin can't be started, exits, or doesn't answer in time, a failure log is written to logs/ in the config folder and named in the error. The plugin's environment is left out of the log, and a remote plugin or a stop writes none. The failure-log writer moves to the engine crate so plugins and agent runs share it.
The jump-table sweep found the next function with a `for` loop that always stopped on its first pass, which failed SonarCloud's reliability gate on main (java:S1751). It now takes the first function from the iterator, and the sweep still ends at the memory block's end when there's none. Behaviour is unchanged; the live Ghidra tests pass.
The shared engine downloader already required an HTTPS starting address but followed a redirect from HTTPS to plain HTTP. Every redirect hop is now held to HTTPS before connecting, and a refused redirect says so without printing the address, which can carry a signed query or credentials. Tested against local TLS servers with certificates made for each run.
Bounding Ghidra's unguarded jump tables now takes the table from the lea that sets the movsxd's base register, and the index from the movzx into its index register, instead of the nearest lea; only an and of that index, or a cmp of it or its source byte followed by a conditional jump, counts as a guard. A pass that fails part way is undone instead of leaving half-made references. Checked live with Ghidra 12.1.4.
A jump through a byte-indexed table of offsets with no bounds check, as Rust's async state machines use, made Ghidra read 256 entries, follow the ones inside other code and decompile without end (#1715). Before decompiling, the bridge now finds such tables, works out where each ends from a linear pass over the function (its .pdata extent on Windows) and gives Ghidra their real targets as a switch override, in memory for this run; guarded tables only get their targets added. A 60-stage Rust async program decompiled in 16 s instead of falling back after 938 s. Fixes#1715.
While native_function_pseudocode waited on Ghidra the feed showed only "start native function pseudocode" for up to 15 minutes, because the tool runs in our MCP server inside the coding agent and its progress reaches only the agent (#1714). A decompile now says, once a minute, how long it has waited (or that it is queued behind another decompile), as the tool's progress and as a line in the project's inbox; the run shows each new line in the feed, the line goes when the wait ends, and a run starts by clearing lines a stopped tool left.
When a program printed more than its output cap, its error said "what it printed last" from the first bytes kept and never said the rest was dropped. The process runner now also keeps the last 16 KiB of a stream once it passes its cap; failure messages, ssh diagnosis and build checks quote that end and say the output was cut, while tools that parse output still get its start.
The tar reader handled per-member PAX extensions but ignored global ones, so later members could get the wrong path, link target or stored size, and a global size override left the next header at the wrong offset. Global path, link and size attributes are now kept until a later global record replaces or deletes them, applied after per-member PAX values and before GNU long names or the plain header. Each metadata header is read at its own stored length, inherited sizes must be unsigned decimals, and inherited sparse attributes are reported as unsupported. Copies of inherited names share a 64 MiB budget; engine installs refuse an archive that exceeds it before writing anything.
Unity Editors were looked for only in Unity Hub's default folders and its install-location setting, so an editor added to the Hub with Locate, which can be anywhere, wasn't found and Make kept saying Unity isn't installed. Unity Hub's own list of editors (editors-v2.json, then editors.json) is now read too, in either of its layouts, and every editor on it whose program is still there is offered; the list is read up to 1 MiB, and one that can't be read finds nothing.
Refs #1077
A GNU long-name or long-link record whose text was complete but whose 512-byte padding was cut off, or whose padded size overflowed, stopped the listing without saying why, so the engine installer could still write the files listed before it and report success. Both cases now count as a cut-short GNU record, and the installer refuses the archive before writing anything.
When a tar listing stopped at a GNU long name or link it refused (too long, or cut short), the engine installer still wrote the files listed before it and reported success, which could replace a working engine with part of one. The listing now says why it stopped, and the installer refuses such an archive before writing anything, with a plain-English error. An archive missing only its end marker still installs.
The header line of a device's `ps` output is now cut at the same length limit as its rows, on a character boundary, so a very long header can't stretch the columns read for every process.
Moving a Ghidra project folder that Windows reports as shared or locked (codes 32 and 33) now waits and tries again, as a permission error already did.
A long adb or Frida output line is cut at the last character boundary within the cap, so a multi-byte character at the cut no longer keeps the whole line.
A move that can't pass gives the lock back and says why, tested with a release that works and one that doesn't, and a second reason no longer repeats "could not start Ghidra".
A refused move is only waited on when it may pass, and a timeout says what kept it waiting; a lock that can't be released ends the attempt with the reason.
A new build taking over a stale lock moves the project folder aside rather than deleting it, and waits if the move is refused because another Ghidra still has it open.
Closes#951.
Ghidra's public downloads leave out macOS's native programs, so a Deep build analysed for many minutes and then decompiled nothing. It now stops at once and says which command builds one; an install laid out in a way we don't recognise is left to Ghidra.
Closing the app stops analyses and waits for them to end. A Deep build no longer waits on Ghidra for an Electron program, whose logic is in `app.asar`.
Closes#946.
Closes#947.
Loopback test fixtures read complete request headers, negative probes use port zero, and the stand-in's shutdown test checks its answerer's lifetime rather than a port another test may reuse.
Chrome, Brave, Chromium and Edge installed as Flatpaks on Linux are found, and a Flatpak or Snap browser keeps its private profile in the home folder its sandbox shares, so it can start and its port can be read (fixes#747).
Ghidra is found where people unzip it (Program Files, the home folder, Downloads, Desktop, /Applications, Homebrew's cask and the usual Linux folders), by folder name a set number of levels down, and the guided install uses a copy already on the computer instead of downloading it again (fixes#740).
Unreal's readiness check finds Visual Studio's C++ tools installed outside Program Files, from the Visual Studio Installer's instance records and a developer shell's VSINSTALLDIR, VCINSTALLDIR or VCToolsInstallDir (fixes#669).
The Ghidra client refuses a reply line over 128 MiB and closes the connection, so a hostile binary can't make one reply exhaust memory; a long reply split across read ticks is still read whole.
On Linux, where the default engine store is under ~/.config, Ghidra is given a dot-free link to the store in a private runtime folder, since it refuses project paths with a dot folder; Deep mode now uses Ghidra there.
doctor reports which Java Ghidra runs on (JAVA_HOME_OVERRIDE in its launch.properties, the Java set for it in Settings, JAVA_HOME, then PATH), and warns when the set folder has no Java or an override wins over it.
Test sessions set engines.only_configured (never saved), so Settings::ghidra_launcher and engine_path look only where the settings and the managed store say, not on PATH or in the usual install folders. Tests now pass the same on a machine with Ghidra installed. New locate_configured and ghidra::get::headless_configured are the first half of locate and headless, which return the same as before.
Listing Frida devices with a remote address returns that remote as one device, marked not contacted, instead of running frida-ls-devices with a -H flag it doesn't have.
In Deep mode, a position-independent program is decompiled by name: addresses move between our image base and the one Ghidra loaded it at (the bridge now reports it), with engine_entry and an engine_rebased limitation when they differ.
Reads Linux registrations from ~/.config/Epic/UnrealEngine/Install.ini, honours a valid UE_ROOT, takes the version from Build.version, and counts the selected engine's own bundled Clang as its C++ tools.