> > Well... Note that you are currently living dangerously if you're using > > an s# format and access that buffer again after a > > Py_BEGIN_ALLOW_THREADS. If the object passed from Python was a mutable > > object with a buffer interface there's a chance that another thread > > has moved the underlying data. > > It can even by the same thread, executing an innocent Py_DECREF() > can execute arbitrary Python code. Thinking of it, it's not clear > what you are allowed to do after PyArg_Parse() if you still need > the 'parsed pointers'. > > And that's the main point of the PEP: the 'old' buffer interface > is nearly useless if you want too be safe. Except that we can't force everyone to change at once, so we're stuck with this... Can you find an actual case where this could be used to cause a segfault? --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4