[issue42616] C Extensions on Darwin that link against libpython are likely to crash
Change by Tom Birch : -- components: +C API, Extension Modules ___ Python tracker <https://bugs.python.org/issue42616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42616] C Extensions on Darwin that link against libpython are likely to crash
Tom Birch added the comment: Steve Dower: this issue is independent of distutils, reopening -- components: -Distutils status: closed -> open ___ Python tracker <https://bugs.python.org/issue42616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42616] C Extensions on Darwin that link against libpython are likely to crash
Tom Birch added the comment: > Does this affect unix-style builds with --enable-shared or framework builds? I believe the answer is no, since in both those cases the `python` executable doesn't contain definitions for any of the libpython symbols. In my testing I was using a python binary from anaconda, where the `python` executable defines all the symbols found in libpython. -- ___ Python tracker <https://bugs.python.org/issue42616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42616] C Extensions on Darwin that link against libpython are likely to crash
New submission from Tom Birch : After https://github.com/python/cpython/pull/12946, there exists an issue on MacOS due to the two-level namespace for symbol resolution. If a C extension links against libpython.dylib, all symbols dependencies from the Python C API will be bound to libpython. When the C extension is loaded into a process launched by running the `python` binary, there will be two active copies of the python runtime. This can lead to crashes if objects from one runtime are used by the other. https://developer.apple.com/library/archive/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html#//apple_ref/doc/uid/TP40002850-BCIHJBBF See issue/test case here: https://github.com/PDAL/python/pull/76 -- components: C API, macOS messages: 382841 nosy: froody, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: C Extensions on Darwin that link against libpython are likely to crash type: crash versions: Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42616> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com