[New-bugs-announce] [issue36722] In debug build, load also C extensions compiled in release mode or compiled using the stable ABI

STINNER Victor report at bugs.python.org
Thu Apr 25 15:00:47 EDT 2019


New submission from STINNER Victor <vstinner at redhat.com>:

bpo-36465 modified the ABI of debug build so release and debug build now have the same ABI.

bpo-21536 modified how C extensions are built: they are no longer linked to libpython.

In a debug build, it becomes possible to load a C extension built in release mode:
https://bugs.python.org/issue21536#msg340821

But I had to modify SOABI for that.

I propose to modify how Python looks for C extensions: look also for dynamic libraries without the "d" SOABI flag and for C extensions built using the stable ABI.

Release build:

$ ./python -c 'import _imp; print(_imp.extension_suffixes())'
['.cpython-38-x86_64-linux-gnu.so', '.abi3.so', '.so']

Debug build, *WITHOUT* my change:

$ ./python -c 'import _imp; print(_imp.extension_suffixes())'
['.cpython-38d-x86_64-linux-gnu.so', '.so']

Debug build, *WITH* my change:

$ ./python -c 'import _imp; print(_imp.extension_suffixes())'
['.cpython-38d-x86_64-linux-gnu.so', '.cpython-38-x86_64-linux-gnu.so', '.abi3.so', '.so']

----------
components: Build
messages: 340856
nosy: vstinner
priority: normal
severity: normal
status: open
title: In debug build, load also C extensions compiled in release mode or compiled using the stable ABI
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36722>
_______________________________________


More information about the New-bugs-announce mailing list