This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author snoeberger
Recipients snoeberger
Date 2014-05-02.19:22:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399058560.74.0.137672140336.issue21418@psf.upfronthosting.co.za>
In-reply-to
Content
While embedding the Python interpreter in an application, I have encountered a crash when the built-in function 'super' is invoked with no arguments. The crash occurs during a call to PyObject_Call.

A file is attached, super_invoke.c, that reproduces the crash. The reproduction steps on my machine are the following:

% gcc -o super_invoke super_invoke.c -I/path_to_py/include/python3.5m -L/path_to_py/lib -lpthread -ldl -lutil -lm -lpython3.5m -Xlinker -export-dynamic 
% ./super_invoke 
Call super with no arguments...
Segmentation fault
% 

The crash appears to occur in the function super_init contained in the file Objects/typeobject.c. The code path enters the if statement that checks for no input arguments. The following two lines cause the crash.

PyFrameObject *f = PyThreadState_GET()->frame;
PyCodeObject *co = f->f_code;

The PyFrameObject pointer 'f' is NULL.
History
Date User Action Args
2014-05-02 19:22:40snoebergersetrecipients: + snoeberger
2014-05-02 19:22:40snoebergersetmessageid: <1399058560.74.0.137672140336.issue21418@psf.upfronthosting.co.za>
2014-05-02 19:22:40snoebergerlinkissue21418 messages
2014-05-02 19:22:40snoebergercreate