Skip to content

[3.15] gh-131565: Implement ctypes.util.dllist() in the _ctypes extension (GH-154255) - #154882

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-bfc16a7-3.15
Jul 29, 2026
Merged

[3.15] gh-131565: Implement ctypes.util.dllist() in the _ctypes extension (GH-154255)#154882
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-bfc16a7-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

On NetBSD dl_iterate_phdr() reports only the link-map group of the calling
object. Called through ctypes, the caller is libffi's closure trampoline,
which belongs to no object, so only the main executable was reported.
Calling dl_iterate_phdr() from the _ctypes extension module makes _ctypes
the caller and reports all loaded shared libraries.
(cherry picked from commit bfc16a7)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-Authored-By: Claude Fable 5 noreply@anthropic.com

…ion (pythonGH-154255)

On NetBSD dl_iterate_phdr() reports only the link-map group of the calling
object.  Called through ctypes, the caller is libffi's closure trampoline,
which belongs to no object, so only the main executable was reported.
Calling dl_iterate_phdr() from the _ctypes extension module makes _ctypes
the caller and reports all loaded shared libraries.
(cherry picked from commit bfc16a7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) July 29, 2026 14:49
@serhiy-storchaka
serhiy-storchaka merged commit 7bd27e6 into python:3.15 Jul 29, 2026
60 checks passed
@miss-islington
miss-islington deleted the backport-bfc16a7-3.15 branch July 29, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants