[issue41180] marshal load bypass code.__new__ audit event

Steve Dower report at bugs.python.org
Tue Jun 29 18:20:12 EDT 2021


Steve Dower <steve.dower at python.org> added the comment:

I'm going to revert this and replace it with a marshal.loads (and dumps) event instead.

The performance impact on loading .pyc files is too great, as it triggers the hook for each function. Without severely modifying importlib we can't bypass the call that's accessible to Python code, and the important part to detect is marshal calls outside of regular imports.

And wanted to mention that Yunfan Zhan suggested adding these events originally and I chose to go the other way. So my bad, and let's get it right now!

----------
assignee:  -> steve.dower
nosy: +gvanrossum
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
versions: +Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41180>
_______________________________________


More information about the Python-bugs-list mailing list