This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年06月28日 16:45 by mfoetsch, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| hashlib-leak.patch | amaury.forgeotdarc, 2012年06月28日 17:39 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg164274 - (view) | Author: Michael Fötsch (mfoetsch) * | Date: 2012年06月28日 16:45 | |
If the "name" argument to "_hashlib.new()" is not a string, the reference count for the "string" argument is not decremented. In the file "Modules/_hashopenssl.c", function "EVP_new()", a call to "PyBuffer_Release()" is missing: if (!PyArg_Parse(name_obj, "s", &name)) { + PyBuffer_Release(&view); PyErr_SetString(PyExc_TypeError, "name must be a string"); return NULL; } |
|||
| msg164276 - (view) | Author: Michael Fötsch (mfoetsch) * | Date: 2012年06月28日 16:48 | |
The change is against the 2.7 branch. The 3.2 branch is not affected. |
|||
| msg164277 - (view) | Author: Jesús Cea Avión (jcea) * (Python committer) | Date: 2012年06月28日 17:00 | |
Could you possibly provide a testcase?. |
|||
| msg164284 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2012年06月28日 17:39 | |
Here is a test, which fails when I run regrtest with leak detection: ./python -m test.regrtest -R:: test_hashlib |
|||
| msg164299 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年06月28日 23:14 | |
Looks good to me. |
|||
| msg164300 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年06月28日 23:45 | |
New changeset 49dee01d72f9 by Amaury Forgeot d'Arc in branch '2.7': Issue #15219: Fix a reference leak when hashlib.new() is called with http://hg.python.org/cpython/rev/49dee01d72f9 |
|||
| msg164302 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年06月28日 23:53 | |
New changeset c974c99acdf5 by Amaury Forgeot d'Arc in branch 'default': Port tests from Issue #15219, and verify we don't have a reference leak. http://hg.python.org/cpython/rev/c974c99acdf5 |
|||
| msg164303 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2012年06月28日 23:54 | |
Fixed in 2.7, and ported test to 3.3. Thanks for the report and the fix! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:32 | admin | set | github: 59424 |
| 2012年06月28日 23:54:30 | amaury.forgeotdarc | set | status: open -> closed resolution: fixed messages: + msg164303 stage: commit review -> resolved |
| 2012年06月28日 23:53:43 | python-dev | set | messages: + msg164302 |
| 2012年06月28日 23:45:55 | python-dev | set | nosy:
+ python-dev messages: + msg164300 |
| 2012年06月28日 23:14:23 | pitrou | set | nosy:
+ pitrou messages: + msg164299 assignee: amaury.forgeotdarc stage: commit review |
| 2012年06月28日 17:39:38 | amaury.forgeotdarc | set | files:
+ hashlib-leak.patch nosy: + amaury.forgeotdarc messages: + msg164284 keywords: + patch |
| 2012年06月28日 17:00:10 | jcea | set | nosy:
+ jcea messages: + msg164277 |
| 2012年06月28日 16:48:39 | mfoetsch | set | messages: + msg164276 |
| 2012年06月28日 16:45:53 | mfoetsch | create | |