Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable test_dlopen_handle on FreeBSD #144

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Conversation

rhelmot
Copy link
Contributor

@rhelmot rhelmot commented Nov 17, 2024

This test assumes that libdl.so's dlopen actually works, but it does not on FreeBSD. You need to link against libc for the working function, but that provides the same error stub as libdl (see below). In order to get it to actually work correctly, the dynamic loader will resolve the weak symbol to a function defined within ld-elf.so itself, and so the test is not trivially fixable.

I can provide more FreeBSD system references if needed.

$ objdump -d /lib/libc.so.7 | grep -A8 '<dlopen>'
0000000000094d10 <dlopen>:
   94d10: 55                            pushq   %rbp
   94d11: 48 89 e5                      movq    %rsp, %rbp
   94d14: 48 8d 3d 05 45 fb ff          leaq    -0x4bafb(%rip), %rdi    # 0x49220
   94d1b: 31 c0                         xorl    %eax, %eax
   94d1d: e8 5e 4d 13 00                callq   0x1c9a80 <_rtld_error@plt>
   94d22: 31 c0                         xorl    %eax, %eax
   94d24: 5d                            popq    %rbp
   94d25: c3                            retq

@arigo arigo merged commit f44941e into python-cffi:main Nov 18, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants