[New-bugs-announce] [issue18913] ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6

Matěj Stuchlík report at bugs.python.org
Tue Sep 3 13:46:41 CEST 2013


New submission from Matěj Stuchlík:

Doing 'valgrind --suppressions=Misc/valgrind-python.supp ./python Lib/tests/test_ssl.py' I'm getting:

==322== LEAK SUMMARY:
==322==    definitely lost: 32 bytes in 1 blocks
==322==    indirectly lost: 392 bytes in 16 blocks
==322==      possibly lost: 1,617,191 bytes in 1,052 blocks
==322==    still reachable: 4,068,239 bytes in 3,201 blocks
==322==         suppressed: 0 bytes in 0 blocks


I managed to reduce that to a shorter reproducer:

"""
import os
import ssl

NULLBYTECERT = os.path.join(os.path.dirname(__file__) or os.curdir, "nullbytecert.pem")
p = ssl._ssl._test_decode_cert(NULLBYTECERT)
"""

where NULLBYTECERT is the cert introduced in issue18709.

Python 2.7 does not leak like this, and the PySSL_test_decode_certificate function looks the same there as in Python 2.6, so I assume it's something else that does the actual leaking.

----------
components: Extension Modules
messages: 196837
nosy: sYnfo
priority: normal
severity: normal
status: open
title: ssl._ssl._test_decode_cert seems to leak memory with certain certificates in Python 2.6
type: resource usage
versions: Python 2.6

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


More information about the New-bugs-announce mailing list