-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uninstrumented functions may be called #365
Comments
TitleInstrument Pre-loaded Function References to Ensure Event Recording ProblemUninstrumented functions referenced at the module import stage do not generate any events in the recording. When application code saves a reference to a function upon importing, calls to this function fail to trigger events. This issue arises because instrumentation occurs after module load, affecting reference semantics. AnalysisWhen the program loads a module, any references to functions made before the instrumentation process will point to uninstrumented versions. Calls to these pre-loaded references will not generate events, as they bypass the instrumentation logic intended to track function calls. To address this issue, it is necessary to ensure that function references saved at module import time are instrumented. One way to fix this is by wrapping references to functions at the point of assignment. This would involve modifying the function reference wrapping logic to check for already-referenced functions and instrument them as needed. Proposed Changes
Detailed Steps
By implementing these changes, we ensure that calls to functions referenced before the instrumentation will generate the necessary events, maintaining the integrity of the recording process even for pre-loaded function references. |
If application code saves a reference to function when the code is imported, a call to that function won't generate any events in the recording.
For example, with this definition
no events for the call to
free_method
will be recorded. This is because instrumentation offree_method
happens after the module is loaded, and so after the call topartial(free_method))
has saved the reference tofree_method
.The text was updated successfully, but these errors were encountered: