Skip to content

Default dlopenflags inconsistent between Linux and macOS #137880

@pitrou

Description

@pitrou

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions