Uh oh!
There was an error while loading. Please reload this page.
gh-143756: Avoid borrowed reference in SSL code - #143816
Conversation
GET_SOCKET() returned a borrowed reference, which was potentially unsafe. Also, refactor out some common code.
| get_socket(PySSLSocket *obj, PySocketSockObject **out_sock, | ||
| const char *filename, int lineno) |
There was a problem hiding this comment.
It would significantly simplify usage if this were a macro that automatically passed __FILE__ and __LINE__.
There was a problem hiding this comment.
If we have a macro, AFAIR, it expands to something that will not be visually helpful (on the IDE the reported line would mismatch, but I may be wrong here).
So we also could well remove all file/lineno reports and add a description of what we were doing instead, or the involved function.
The file/lineno is only for us to know what happened when someone reports a bug. But the file is likely to always be the same...
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
GET_SOCKET() returned a borrowed reference, which was potentially unsafe. Also, refactor out some common code.
GET_SOCKET() returned a borrowed reference, which was potentially unsafe with free threading. Also, refactor out some common code.