Ghidra is a software reverse engineering (SRE) framework
GP-3527 Auto VT dupe function match speedup
ghidra00762622898a284
diff --git a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/AutoVersionTrackingTask.java b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/AutoVersionTrackingTask.javaindex 670b7b1db6..6522d5954b 100644--- a/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/AutoVersionTrackingTask.java+++ b/Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/AutoVersionTrackingTask.java@@ -464,13 +464,27 @@ public class AutoVersionTrackingTask extends Task {continue;}+ // if already matched or blocked skip it+ if (match.getAssociation().getStatus() != VTAssociationStatus.AVAILABLE) {+ continue;+ }+// Get a set of related matches from the set of all matches. These all have the same// instructions as each other but not necessarily the same operands.Set<VTMatch> relatedMatches = getRelatedMatches(match, matches, monitor);- // remove related matches from the set of matches to process next time+ // remove related matches from the copy of set of matches which gets checked+ // and skipped if not in the setremoveMatches(copyOfMatches, relatedMatches);+ if (relatedMatches.size() > 20) {+ Msg.debug(this, "Too many related matches to process this match set " ++ match.getSourceAddress());+ continue;+ }+++// remove any matches that have identical source functions - if more than one// with exactly the same instructions and operands then cannot determine a unique matchSet<Address> sourceAddresses = getSourceAddressesFromMatches(relatedMatches, monitor);