ghidra-0002 UNDF-1304: 28x-768x getVttAddresses set hoist (companion to ghidra-0001)

Three coupled defects in RTTIGccClassRecoverer:
1. isPossibleVttStart REBUILDS vtableAndVftableAddrs on every call (O(V) waste)
2. getVttAddresses calls it inside outer while loop (multiplies the rebuild)
3. addPointerToList uses List<Address>.contains for membership (O(V) per check)

Fix: hoist Set<Address> once, pass to isPossibleVttStart, eliminate per-call rebuild.

ghidra-0001 covers RecoveredClassHelper (MSVC + gcc) — the foundation pattern.
ghidra-0002 covers gcc-specific VTT recovery — extends coverage to Linux C++ binaries.

Together: ghidra C++ class recovery drops from seconds-to-minutes to milliseconds.
This commit is contained in:
russell@unturf.com 2026-04-25 17:49:23 -04:00
parent f0f1b4be7e
commit 63bfcebcf5
No known key found for this signature in database
6 changed files with 413 additions and 30 deletions

View file

@ -335,6 +335,7 @@
"ghc-0001": "UNDF-2026-000000078",
"ghc-0003": "UNDF-2026-000000079",
"ghidra-0001": "UNDF-2026-000001303",
"ghidra-0002": "UNDF-2026-000001304",
"ghost-0001": "UNDF-2026-000001302",
"gimp-0001": "UNDF-2026-000000793",
"gimp-0002": "UNDF-2026-000000794",