New submission from Madhu <enom...@meer.net>:
Attached zip file has a test case which illustrate the problem: A python process (`dload.py') loads up a shared library (`libfoo1.so') and makes a call to a foreign function `foo'. `foo' Initializes Python and creates makes a call to PyModule_New at which point dload.py crashes. If the calling process is not python(`dload.c'), there is no crash This sort of situation occurs with python-pam. I'm not sure if this is a programmer error and would welcome correction [I'm supplying a zip file because I can't attach multiple files Steps to repeat 1. compile libfoo1.so according to comment 2. Run ./dload.py 3. Optionally compile and run dload.c ---------- components: Extension Modules files: test-case-embedded-1.zip messages: 399591 nosy: enometh priority: normal severity: normal status: open title: segfault in call to embedded PyModule_New versions: Python 3.9 Added file: https://bugs.python.org/file50217/test-case-embedded-1.zip _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44913> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com