Skip to content

The example from the README fails on FreeBSD #98

Description

@yurivict

This program fails:

from dlinfo import DLInfo
import ctypes

lib = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
dlinfo = DLInfo(lib)
print(dlinfo.path)
Traceback (most recent call last):
  File "/usr/ports/devel/py-dlinfo/x.py", line 8, in <module>
    print(dlinfo.path)
          ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/dlinfo/_glibc.py", line 46, in path
    return self._linkmap.contents.l_name.decode(sys.getdefaultencoding())
           ^^^^^^^^^^^^^^^^^^^^^^
ValueError: NULL pointer access

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions