[issue40965] Segfault when importing unittest module

2020-06-12 Thread The Comet


New submission from The Comet :

The following program will segfault the interpreter:

#include 
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 
<https://bugs.python.org/issue40965>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40965] Segfault when importing unittest module via C API

2020-06-22 Thread The Comet


The Comet  added the comment:

Thanks for the input! I should have been more specific. I was running python 
3.8.2 when I got this segfault.

I upgraded to 3.8.3 and the issue is no longer present, so it seems this has 
already been fixed.

--

___
Python tracker 
<https://bugs.python.org/issue40965>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com