Message217777
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. |
|
Date |
User |
Action |
Args |
2014-05-02 19:22:40 | snoeberger | set | recipients:
+ snoeberger |
2014-05-02 19:22:40 | snoeberger | set | messageid: <1399058560.74.0.137672140336.issue21418@psf.upfronthosting.co.za> |
2014-05-02 19:22:40 | snoeberger | link | issue21418 messages |
2014-05-02 19:22:40 | snoeberger | create | |
|