New submission from Robert Snoeberger: 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. ---------- files: super_invoke.c messages: 217777 nosy: snoeberger priority: normal severity: normal status: open title: Segv during call to super_init in application embedding Python interpreter. type: crash versions: Python 3.5 Added file: http://bugs.python.org/file35131/super_invoke.c _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue21418> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
