From f2430c57b19d1ff3fb4bcaf2f8c511e4d2a05d56 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Fri, 23 Jun 2023 14:45:37 -0400 Subject: Add warnings around the use of add_binaryview_initial_analysis_completion_event and add_binaryview_finalized_event --- python/binaryview.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python') diff --git a/python/binaryview.py b/python/binaryview.py index 586c9f6e..2735e882 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -1307,6 +1307,9 @@ class BinaryViewType(metaclass=_BinaryViewTypeMetaclass): `add_binaryview_finalized_event` adds a callback that gets executed when new binaryview is finalized. For more details, please refer to the documentation of BinaryViewEvent. + + .. warning:: The callback provided **must** stay in scope for the lifetime of the process, deletion or \ + garbage collection of the callback will result in a crash. """ BinaryViewEvent.register(BinaryViewEventType.BinaryViewFinalizationEvent, callback) @@ -1317,6 +1320,9 @@ class BinaryViewType(metaclass=_BinaryViewTypeMetaclass): that gets executed after the initial analysis, as well as linear sweep and signature matcher (if they are configured to run) completed. For more details, please refer to the documentation of BinaryViewEvent. + + .. warning:: The callback provided **must** stay in scope for the lifetime of the process, deletion or \ + garbage collection of the callback will result in a crash. """ BinaryViewEvent.register(BinaryViewEventType.BinaryViewInitialAnalysisCompletionEvent, callback) -- cgit v1.3.1