Commit graph

2 commits

Author SHA1 Message Date
63bfcebcf5
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.
2026-04-25 17:49:23 -04:00
dce02d80df
wave20: ghidra-0001 UNDF-1303 (6.5x-27x RecoveredClassHelper) + 9 clean-scan additions
Flagship: ghidra RecoveredClassHelper.addVftableReferencesToFunctionMapping
+ addFunctionsToClassMapping. Each insert does List.contains + ArrayList
copy on every add, giving O(F*R^2) per binary. Map<F, LinkedHashSet<T>>
rewrite gives O(F*R) and 27x speedup at F=2k R=500.

Reverse-engineering large C++ binaries (1000+ classes, 10k+ vtable refs)
sees seconds-to-minutes per RecoverClassesFromRTTIScript run today.

Wave 20 honor roll: cri-o, runc, youki, quickjs, hermes, ripgrep, radare2,
monero, mitmproxy. Cumulative: 115 projects.
2026-04-25 15:49:17 -04:00