[New-bugs-announce] [issue44913] segfault in call to embedded PyModule_New

Madhu report at bugs.python.org
Sat Aug 14 10:28:01 EDT 2021


New submission from Madhu <enometh at 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 <report at bugs.python.org>
<https://bugs.python.org/issue44913>
_______________________________________


More information about the New-bugs-announce mailing list