[issue43439] [security] Add audit events on GC functions giving access to all Python objects

Saiyang Gou report at bugs.python.org
Thu Mar 11 18:08:36 EST 2021


Saiyang Gou <gousaiyang223 at gmail.com> added the comment:

There is a minor issue here. For gc.get_referrers and gc.get_referents, probably the format code for PySys_Audit should be "(O)" instead of "O". Typically the tuple `args` passed to the hook functions are fixed-length as described in the audit events table. Here `objs` itself is a tuple (containing variable-length arguments) and directly passed to the audit hook with being wrapped by another layer of tuple. If the hook function is to receive a variable-length tuple, probably the documentation should be updated to mention this.

----------
nosy: +gousaiyang

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


More information about the Python-bugs-list mailing list