Summary: | (cpychecker) Segfault in gdb/python/py-function.c:convert_values_to_python under low memory conditions | ||
---|---|---|---|
Product: | gdb | Reporter: | Dave Malcolm <dmalcolm> |
Component: | python | Assignee: | Phil Muldoon <pmuldoon> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pmuldoon |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | 7.4 | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | HTML report showing the execution paths that can crash |
CVSROOT: /cvs/src Module name: src Changes by: pmuldoon@sourceware.org 2011-10-27 10:29:58 Modified files: gdb : ChangeLog gdb/python : py-function.c Log message: 2011-10-27 Phil Muldoon <pmuldoon@redhat.com> PR python/13331 * python/py-function.c (fnpy_call): Check 'args' is not NULL. (convert_values_to_python): Return on Python tuple allocation failure. Return NULL on value conversion error. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13464&r2=1.13465 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/python/py-function.c.diff?cvsroot=src&r1=1.10&r2=1.11 Fixed and committed. |
Created attachment 6025 [details] HTML report showing the execution paths that can crash convert_values_to_python doesn't check the return value from PyTuple_New, which can return NULL under low memory conditions. If it returns NULL and argc > 0 then there are two different segfaults possible; see attached HTML.