pmrep segv, was Re: QA failures - holding the release
"Frank Ch. Eigler" <[email protected]>
| Newsgroups | gmane.comp.sysutils.pcp |
|---|---|
| Message-ID | <[email protected]> |
> [...]
>> 1069 python, pmrep segfaults
>> $ pmrep -s 1 --archive archives/20130706 -z -O 30m
>> disk.dev.read,,"'sda','sdb'",,,16
>> d.d.read d.d.read
>> sda sdb
>> count/s count/s
>> N/A N/A
>> Segmentation fault (core dumped)
>> must be segfaulting somewhere in the C libraries?
Yes. The getNonOptionsFromList() binding in src/python/pmapi.c
messes up reference counts as it's constructing its output list.
The following patch appears to correct it:
diff --git a/src/python/pmapi.c b/src/python/pmapi.c
index fb025f13abc8..c9ef3676be71 100644
--- a/src/python/pmapi.c
+++ b/src/python/pmapi.c
@@ -779,6 +779,7 @@ getNonOptionsFromList(PyObject *self, PyObject
*args, PyObject *keywords)
for (i = 0; i < length; i++) {
PyObject *pyarg = PyList_GET_ITEM(pyargv, options.optind + i);
+ Py_INCREF(pyarg);
PyList_SET_ITEM(result, i, pyarg);
}
Py_INCREF(result);
-=-=-=-=-=-=-=-=-=-=-=-
pcp mailing list
[email protected]
https://groups.io/g/pcp/messages
-=-=-
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#14709): https://groups.io/g/pcp/message/14709
View All Messages In Topic (1): https://groups.io/g/pcp/topic/3144912
Mute This Topic: https://groups.io/mt/3144912?uid=174580
New Topic: https://groups.io/g/pcp/post
Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580
Group Home: https://groups.io/g/pcp
Contact Group Owner: [email protected]
Terms of Service: https://groups.io/static/tos
Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy
-=-=-=-=-=-=-=-=-=-=-=-