From 74284a28204f6f9e26bfde7a53b7a33bed451e09 Mon Sep 17 00:00:00 2001 From: emteere <47253321+emteere@users.noreply.github.com> Date: Thu, 9 Jul 2020 18:51:39 -0400 Subject: [PATCH] GT-0_emteere bugfix - performance issue for function start patterns post function existence check --- .../ghidra/app/analyzers/FunctionStartFuncAnalyzer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Ghidra/Features/BytePatterns/src/main/java/ghidra/app/analyzers/FunctionStartFuncAnalyzer.java b/Ghidra/Features/BytePatterns/src/main/java/ghidra/app/analyzers/FunctionStartFuncAnalyzer.java index 7d8f120da3..36ed32067e 100644 --- a/Ghidra/Features/BytePatterns/src/main/java/ghidra/app/analyzers/FunctionStartFuncAnalyzer.java +++ b/Ghidra/Features/BytePatterns/src/main/java/ghidra/app/analyzers/FunctionStartFuncAnalyzer.java @@ -1,6 +1,5 @@ /* ### * IP: GHIDRA - * REVIEWED: YES * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +44,11 @@ public class FunctionStartFuncAnalyzer extends FunctionStartAnalyzer { getOrCreatePotentialMatchPropertyMap(program).getAddressSet(); set = set.intersect(potentialPreMatches); + // no previous no-function existing pre-requisites to check + if (set.isEmpty()) { + return true; + } + return super.added(program, set, monitor, log); }