[New-bugs-announce] [issue25569] Memory leak in SSLSocket.getpeercert()

Alex Gaynor report at bugs.python.org
Fri Nov 6 15:08:01 EST 2015


New submission from Alex Gaynor:

Run the following code:

import socket
import ssl
import sys


def main():
    ctx = ssl.create_default_context()
    s = socket.create_connection(('www.bing.com', 443))
    s = ctx.wrap_socket(s, server_hostname='www.bing.com')
    while True:
        s.getpeercert()

        sys.stderr.write('.')
        sys.stderr.flush()


if __name__ == '__main__':
    main()



and observe memory usage, you'll see it increases by a MB/s or so.

----------
messages: 254210
nosy: alex
priority: normal
severity: normal
status: open
title: Memory leak in SSLSocket.getpeercert()
versions: Python 2.7, Python 3.5, Python 3.6

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


More information about the New-bugs-announce mailing list