Skip to content

perf(ghidra): compile bundle activator with bridge scripts - #1931

Merged
morluto merged 1 commit into
mainfrom
perf/ghidra-bundle-activator-1065
Oct 11, 2026
Merged

morluto merged 1 commit into
mainfrom
perf/ghidra-bundle-activator-1065

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Ghidra opens a second Java compiler and file manager to build a generated OSGi activator after compiling REA's bridge scripts. The Windows JFR investigation for #1065 caught this extra pass during bridge preparation.

Ship the equivalent no-op BundleActivator with the bridge sources so Ghidra selects it from the first compilation. The packaged Windows verifier checks the actual compiled class and Bundle-Activator manifest entry, and rejects a generated activator. The normal package check also verifies that the new source is shipped.

Validation:

  • Full check:fast with serial task scheduling, build:cached, normal npm pack, and the actual packed-bridge verifier passed.
  • Installed package on native Windows, Ghidra 12.1.4 / JDK 21 / SDK 2.3.1: selected class and manifest verified; two distinct functions analyzed with separate Evidence IDs and text/structured parity; input unchanged, empty runtime after close, no observed owned descendants.
  • Native Windows x86 PE32 DLL, same installed artifact without JFR: return 42, caller +1, and the call edge verified; two function analyses, selected activator and cleanup passed. The explicitly reset first query took 248.452 s; native family peak was 878.55 MiB.
  • Full-stage JFR export retained 8,471 CPU/native events, including recorded truncated stacks. Flameox checked the bridge-phase weights against the preserved stacks. No bridge-phase sample contains buildDefaultActivator; the actual manifest/class checks establish that REA supplies the activator.

The profiled first query took 190.114 s; native family peak was 958.44 MiB with a 512 MiB JVM heap. Filesystem cache state was uncontrolled, so the overall timing difference is not a controlled speedup measurement. The default 60 s SDK deadline and large-target memory work remain open.

Refs #1065.

Include the no-op OSGi lifecycle class in the packaged source bundle so
Ghidra does not generate and compile an extra activator afterward.
Check the selected activator in the real packaged Windows verifier.

Co-authored-by: Kaoru0822 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T18:29:33.674326Z fa7a012 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit 0f4992f into main Oct 11, 2026
30 checks passed
@morluto
morluto deleted the perf/ghidra-bundle-activator-1065 branch October 11, 2026 18:46
@github-actions github-actions Bot mentioned this pull request Oct 11, 2026
3 tasks done
@morluto morluto added performance Performance regressions, scaling limits, and bounded-resource work area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added area: bridge Hopper bridge (Python) related changes provider: ghidra Analysis provider / engine: ghidra labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: bridge Hopper bridge (Python) related changes area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior performance Performance regressions, scaling limits, and bounded-resource work provider: ghidra Analysis provider / engine: ghidra

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants