Message303883
The following code causes refleaks:
import zipimport
zi = zipimport.zipimporter.__new__(zipimport.zipimporter)
zi.__init__('bar.zip')
zi.__init__('bar.zip')
zi.__init__('bar.zip\\foo')
This is because zipimport_zipimporter___init___impl() (in Modules/zipimport.c)
doesn't decref (if needed) before assigning to `self->files`, `self->archive`
and `self->prefix`.
I would open a PR to fix this soon.
Should i add a test to test_zipimport?
If yes, could you point out some similar refcount test to help me write this
test? |
|
Date |
User |
Action |
Args |
2017-10-07 15:27:27 | Oren Milman | set | recipients:
+ Oren Milman |
2017-10-07 15:27:27 | Oren Milman | set | messageid: <1507390047.35.0.213398074469.issue31723@psf.upfronthosting.co.za> |
2017-10-07 15:27:27 | Oren Milman | link | issue31723 messages |
2017-10-07 15:27:27 | Oren Milman | create | |
|