Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-143756: Avoid borrowed reference in SSL code#143816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
GET_SOCKET() returned a borrowed reference, which was potentiallyunsafe. 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It would significantly simplify usage if this were a macro that automatically passed__FILE__ and__LINE__.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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.
picnixz left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The design choices of this module are hard to comply with but well... better to have small changes for now.
ee4e14a intopython:mainUh 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 with free threading. Also, refactor out some common code.