Message319394
| Author |
pablogsal |
| Recipients |
pablogsal, serhiy.storchaka, vstinner |
| Date |
2018年06月12日.15:53:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1528818808.47.0.475983251502.issue33630@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Serhiy, I am checking and the only temporary Python object (the result of encoding/decoding) that is passed to C library function that I can find is in:
if (!PyArg_ParseTuple(file_action, "OiO&ik"
";A open file_action tuple must have 5 elements",
&tag_obj, &fd, PyUnicode_FSConverter, &path,
&oflag, &mode))
{
goto fail;
}
errno = posix_spawn_file_actions_addopen(file_actionsp,
fd, PyBytes_AS_STRING(path), oflag, (mode_t)mode);
Py_DECREF(path); /* addopen copied it. */
And according to the manpage of posix_spawn_file_actions_addopen: "The string described by path shall be copied by the posix_spawn_file_actions_addopen() function.".
The object created by `PyArg_ParseTuple` (path) is only freed after calling `posix_spawn_file_actions_addopen` and in that function the contents are copied inside
`file_actionsp`. So it should not be a problem.
In case there is still a problem, could you elaborate more about what object is being freed and how is being passed to a C library function? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2018年06月12日 15:53:28 | pablogsal | set | recipients:
+ pablogsal, vstinner, serhiy.storchaka |
| 2018年06月12日 15:53:28 | pablogsal | set | messageid: <1528818808.47.0.475983251502.issue33630@psf.upfronthosting.co.za> |
| 2018年06月12日 15:53:28 | pablogsal | link | issue33630 messages |
| 2018年06月12日 15:53:28 | pablogsal | create |
|