aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhugsy2020-06-14 16:28:15 -0700
committerhugsy2020-06-14 16:28:15 -0700
commitb5835756369f604ecf50ef72c2fe869f3c7b2ab5 (patch)
treec801cc6bffe2acfff73c0b9d8b17f53fbcd6853d
parent02ab4257439e2ed6fdccb914bdfa2c0b249a1be2 (diff)
downloadgef-b5835756369f604ecf50ef72c2fe869f3c7b2ab5.tar.gz
gef-b5835756369f604ecf50ef72c2fe869f3c7b2ab5.zip
GDB can fail to correctly delete the retbp defined via the Python API. We safely ignore them as the debugging session is ended anyway.HEADmaster
-rw-r--r--gef.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gef.py b/gef.py
index 7bc66c3..0c0ea16 100644
--- a/gef.py
+++ b/gef.py
@@ -9190,7 +9190,12 @@ class HeapAnalysisCommand(GenericCommand):
ok("{} - Cleaning up".format(Color.colorify("Heap-Analysis", "yellow bold"),))
for bp in [self.bp_malloc, self.bp_calloc, self.bp_free, self.bp_realloc]:
if hasattr(bp, "retbp") and bp.retbp:
- bp.retbp.delete()
+ try:
+ bp.retbp.delete()
+ except RuntimeError:
+ # in some cases, gdb was found failing to correctly remove the retbp but they can be safely ignored since the debugging session is over
+ pass
+
bp.delete()
for wp in __heap_uaf_watchpoints__: