This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jcea
Recipients jcea
Date 2019-09-27.21:35:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569620116.14.0.859421629509.issue38301@roundup.psfhosted.org>
In-reply-to
Content
When compiling on Solaris family, we define "_REENTRANT" in "Pyconfig.h".  That file is included when compiling C extensions, but if the extension is made of several C files, it could be included only in the file that interfaces with python runtime.

Unfortunately, "_REENTRANT" modifies the way C code is compiled, so compiling a C extension with some source files with "_REENTRANT" and some other without that "define" can produce bizarre errors and crashes.

One example: https://github.com/joyent/pkgsrc/issues/207

In particular, "include" order can make a big difference: https://github.com/jnwatson/py-lmdb/issues/213

I suggest that when "_REENTRANT" is defined in "Pyconfig.h", Python C extensions compilation machinery adds "-D_REENTRANT" to the compilation flags.

The patch is trivial.
History
Date User Action Args
2019-09-27 21:35:16jceasetrecipients: + jcea
2019-09-27 21:35:16jceasetmessageid: <1569620116.14.0.859421629509.issue38301@roundup.psfhosted.org>
2019-09-27 21:35:16jcealinkissue38301 messages
2019-09-27 21:35:15jceacreate