Ghidra is a software reverse engineering (SRE) framework
GT-2699 fixed stack trace when deleting (large) memory section
ghidravorec02f7167a5e9
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingModelAdapter.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingModelAdapter.javaindex 80d60192dd..9bf2155da5 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingModelAdapter.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/listingpanel/ListingModelAdapter.java@@ -491,11 +491,12 @@ public class ListingModelAdapter implements LayoutModel, ListingModelListener {if (indexBefore == null) {indexBefore = BigInteger.ZERO;}- if (indexAfter.subtract(indexBefore)- .compareTo(addressToIndexMap.getMiniumUnviewableGapSize()) > 0) {+ if (indexAfter.subtract(indexBefore).compareTo(+ addressToIndexMap.getMiniumUnviewableGapSize()) > 0) {Address start = addressToIndexMap.getAddress(indexBefore.add(BigInteger.ONE));Address end = addressToIndexMap.getAddress(indexAfter.subtract(BigInteger.ONE));- if (start != null && end != null) {+ if (start != null && end != null &&+ start.getAddressSpace().equals(end.getAddressSpace())) {addressSet.add(start, end);}}@@ -619,7 +620,7 @@ public class ListingModelAdapter implements LayoutModel, ListingModelListener {/*** Sets the addresses displayed by this model's listing.- * @param view the addresses. These must already be compatible with the program+ * @param view the addresses. These must already be compatible with the program* associated with this model.*/public void setAddressSet(AddressSetView view) {