Default dlopenflags inconsistent between Linux and macOS
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Feature or enhancement
Proposal:
The default dlopen flags for loading extension modules specify neither RTLD_GLOBAL nor RTLD_LOCAL.
Unfortunately, the behavior when neither flag is specified differs between Linux and macOS: on Linux, RTLD_LOCAL is the default, while on macOS RTLD_GLOBAL seems to be the default.
POSIX itself is not helpful on the matter: "If neither RTLD_GLOBAL nor RTLD_LOCAL is specified, the default behavior is unspecified".
Having two different behaviors on two extremely popular platforms may make support more difficult for maintainers of complex extension modules that bundle popular third-party C/C++ libraries (here is a possible instance).
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with CPython's extension-module loading path and the linked dlopen specifications for Linux, macOS, and POSIX. Determine the intended explicit default behavior, then verify that extension loading is consistent across both platforms and that relevant existing coverage still passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100