[issue23001] Accept mutable bytes-like objects

Josh Rosenberg report at bugs.python.org
Sat Dec 6 16:55:28 CET 2014


Josh Rosenberg added the comment:

In the event of calls back into Python code in multithreaded execution (or GIL release), this would mean you no longer have guarantees as to the contents (or even the validity) of the pointer you get back. I'd think the only safe way to accept mutable buffers would be to use the s*, z*, y* codes, which lock the buffer to prevent resize/destruction. Do we want to open segfault vulnerabilities in arbitrary functions?

----------
nosy: +josh.r

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23001>
_______________________________________


More information about the Python-bugs-list mailing list