New submission from The Comet <[email protected]>:
The following program will segfault the interpreter:
#include <Python.h>
int main() {
Py_Initialize();
PyRun_SimpleString("import unittest");
Py_Finalize();
Py_Initialize();
PyRun_SimpleString("import unittest"); /* segfault here */
Py_Finalize();
}
This only seems to happen with the unittest module. This is something that used
to work but broke somewhere between python 3.7 and 3.8.
The code above can also be found on github as a cmake project for your
convenience:
https://github.com/TheComet/python3.8-unittest-broken
----------
messages: 371432
nosy: The Comet
priority: normal
severity: normal
status: open
title: Segfault when importing unittest module
type: crash
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40965>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com