mirror of
https://github.com/NationalSecurityAgency/ghidra
synced 2024-08-27 21:10:26 +00:00
GP-4477 Don't allow references from address tables to offcut strings.
Revert default number of threads for constant analysis.
This commit is contained in:
parent
197a18a77e
commit
28807a4641
|
@ -66,7 +66,7 @@ public class ConstantPropagationAnalyzer extends AbstractAnalyzer {
|
||||||
protected static final String MAX_THREAD_COUNT_OPTION_NAME = "Max Threads";
|
protected static final String MAX_THREAD_COUNT_OPTION_NAME = "Max Threads";
|
||||||
protected static final String MAX_THREAD_COUNT_OPTION_DESCRIPTION =
|
protected static final String MAX_THREAD_COUNT_OPTION_DESCRIPTION =
|
||||||
"Maximum threads for constant propagation. Too many threads causes thrashing in DB.";
|
"Maximum threads for constant propagation. Too many threads causes thrashing in DB.";
|
||||||
protected static final int MAX_THREAD_COUNT_OPTION_DEFAULT_VALUE = 1;
|
protected static final int MAX_THREAD_COUNT_OPTION_DEFAULT_VALUE = 2;
|
||||||
|
|
||||||
protected static final String MIN_KNOWN_REFADDRESS_OPTION_NAME = "Min absolute reference";
|
protected static final String MIN_KNOWN_REFADDRESS_OPTION_NAME = "Min absolute reference";
|
||||||
protected static final String MIN_KNOWN_REFADDRESS_OPTION_DESCRIPTION =
|
protected static final String MIN_KNOWN_REFADDRESS_OPTION_DESCRIPTION =
|
||||||
|
|
|
@ -419,11 +419,8 @@ public class AddressTableAnalyzer extends AbstractAnalyzer {
|
||||||
if (cu == null) {
|
if (cu == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean atStartOfCU = cu.getMinAddress().equals(targetAddr);
|
boolean atStartOfCU = cu.getMinAddress().equals(targetAddr);
|
||||||
// always allow offcuts to strings
|
|
||||||
if (cu instanceof Data data && data.getDataType() instanceof AbstractStringDataType) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!allowOffcutReferences && !atStartOfCU) {
|
if (!allowOffcutReferences && !atStartOfCU) {
|
||||||
// if the processor uses low bit to reference instructions
|
// if the processor uses low bit to reference instructions
|
||||||
// allow offcut to an instruction by 1
|
// allow offcut to an instruction by 1
|
||||||
|
|
Loading…
Reference in a new issue