[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3b9fb8ebf44f by Benjamin Peterson in branch '2.7': fix build with older openssl (#25569) https://hg.python.org/cpython/rev/3b9fb8ebf44f New changeset f13a75544b6f by Benjamin Peterson in branch '3.4': fix build with older openssl (#25569)

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-14 Thread Alex Gaynor
Alex Gaynor added the comment: fixed -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-13 Thread Martin Panter
Martin Panter added the comment: Seems to have broken the SSL module. Looks like you typoed “dps” as “dsp” in some conditional code. http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.4/builds/1326/steps/compile/logs/stdio building '_ssl' extension gcc -fno-strict-aliasing -g -O0

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-13 Thread Martin Panter
Changes by Martin Panter : -- nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 10c3646b2d59 by Benjamin Peterson in branch '2.7': fix memory leak in _get_crl_dp (closes #25569) https://hg.python.org/cpython/rev/10c3646b2d59 New changeset aabe273b20ab by Benjamin Peterson in branch '3.4': fix memory leak in _get_crl_dp (closes

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-07 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi alex, Thank you for your feeback, I will propose an other patch with your remarks. Stephane -- ___ Python tracker

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-07 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: sorry for the delay. here is a new version of my patch, if I can have feedback about this patch, I will really appreciate. thank you -- Added file: http://bugs.python.org/file40976/issue25569-2.patch ___ Python

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-06 Thread Alex Gaynor
Alex Gaynor added the comment: Tests pass and the original script runs without a leak using this patch. It could probably be shorter if we converted from local returns to `goto fail` or something, but I don't really have an opinion. -- ___ Python

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-06 Thread Alex Gaynor
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:

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-06 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou ___ Python tracker ___

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-06 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Maybe you are right, I didn't see that this function returns a pointer in function of the parameter. sorry. Could you try with this patch, really sorry but my internet connection is really slow and I have a problem with the _ssl module on my laptop (problem

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-06 Thread Alex Gaynor
Alex Gaynor added the comment: A probably source of the leak is here: https://github.com/python/cpython/blob/master/Modules/_ssl.c#L1073-L1076 `dps` is never freed. (This is with OpenSSL 0.9.8zg) -- ___ Python tracker

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-06 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi Alex, not sure, but I think the right function to free the memory is AUTHORITY_INFO_ACCESS_free(dps) I will provide a patch for a review asap -- nosy: +matrixise ___ Python tracker

[issue25569] Memory leak in SSLSocket.getpeercert()

2015-11-06 Thread Alex Gaynor
Alex Gaynor added the comment: I think you want sk_DIST_POINT_free actually. -- ___ Python tracker ___ ___