Message295462
The memory leak is in os_spawnv_impl and os_spawnve_impl in Modules/posixmodule.c. The call fails with a ValueError when the first argument in the argv list is an empty string, in which case these functions both mistakenly pass i (0) to free_string_array() as the count of strings to free. But the conversion was successful, so it needs to include the current string in the count, i.e. `i + 1`.
The fix for this could also address the following two issues, which are mostly cosmetic in nature. os_spawnve_impl needs its TypeError message to be special cased the same as in os_spawnv_impl, i.e. "spawnve() arg 2 must contain only strings". Currently it uses the default message from the failed conversion: "expected str, bytes or os.PathLike object, not %.200s". Also, its ValueError message needs to reference "spawnve()" instead of "spawnv()". |
|
Date |
User |
Action |
Args |
2017-06-08 20:09:36 | eryksun | set | recipients:
+ eryksun, paul.moore, vstinner, tim.golden, zach.ware, steve.dower |
2017-06-08 20:09:36 | eryksun | set | messageid: <1496952576.94.0.952832247721.issue30602@psf.upfronthosting.co.za> |
2017-06-08 20:09:36 | eryksun | link | issue30602 messages |
2017-06-08 20:09:36 | eryksun | create | |
|