Message 349255 - Python tracker

Message349255

Author pablogsal
Recipients MrAnno, doko, ericvw, pablogsal, reimar, vstinner
Date 2019-08-08.21:11:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1565298668.08.0.510512061394.issue36753@roundup.psfhosted.org>
In-reply-to
Content
In the What's New section of 3.8 (https://docs.python.org/3.8/whatsnew/3.8.html#changes-in-the-c-api) it indicates that:

> On Unix, C extensions are no longer linked to libpython except on Android and Cygwin. When Python is embedded, libpython must not be loaded with RTLD_LOCAL, but RTLD_GLOBAL instead. Previously, using RTLD_LOCAL, it was already not possible to load C extensions which were not linked to libpython, like C extensions of the standard library built by the *shared* section of Modules/Setup. (Contributed by Victor Stinner in bpo-21536.)

So if you are embedding python by dlopen'ing libpython.so you should use RTLD_GLOBAL to make sure everyone is using the same symbols. You have more information on the rationale and decisions in bpo-21536.

Is your use-case not cover by the arguments in bpo-21536? What is the problem of embedding by dlopening libpython using RTLD_GLOBAL?
History
Date User Action Args
2019-08-08 21:11:08pablogsalsetrecipients: + pablogsal, doko, vstinner, ericvw, reimar, MrAnno
2019-08-08 21:11:08pablogsalsetmessageid: <1565298668.08.0.510512061394.issue36753@roundup.psfhosted.org>
2019-08-08 21:11:08pablogsallinkissue36753 messages
2019-08-08 21:11:07pablogsalcreate