On Saturday, 22 August 2015 21:25:44 Matti Picus wrote: > I would like to add the freebsd-9-x86-64 binary tgz to our released > downloads. We still have a number of failing tests showing up on > http://buildbot.pypy.org/summary?category=freebsd64 > among them many > DLOpenError: "opening 'libm.so' with ctypes.CDLL() works, but not with > c_dlopen()??" > and the more worrying SIGSEGV in > http://buildbot.pypy.org/summary/longrepr?testname=unmodified&builder=pypy-c > -jit-freebsd-9-x86-64&build=655&mod=lib-python.2.7.test.test_io > > Could someone proficient in freebsd suggest what is going on?
Hi Matti,
I am able to reproduce this on FreeBSD 10.2:
# cat > test.py << __EOF
from ctypes import *
libc = CDLL("libc.so.7")
dlopen = libc["dlopen"]
# see <dlfnc.h>: void *dlopen(const char *, int);
dlopen.argtypes = [c_char_p, c_int]
dlopen.restype = c_void_p
print dlopen(c_char_p("libm.so"), c_int(0))
__EOF
# python test.py
None
However, contract this with the C equivalent:
# cat > test.c << __EOF
#include <dlfcn.h>
#include <stdio.h>
int main(int argc, char** argv)
{
printf("%p\n", dlopen("libm.so", RTLD_LOCAL));
}
__EOF
# cc -o test test.c
# ./test
0x800620800
I will investigate further.
As for the SIGSEGV (it does not occur on python):
# gdb `which pypy` pypy.core
gdb) bt
#0 0x00000008006548a7 in ?? ()
#1 0x0000000000000001 in ?? ()
#2 0x00000008020b9cd3 in pypy_thread_attach () from
/usr/local/pypy-2.6/bin//libpypy-c.so
#3 0x00000008020c2ea0 in pypy_thread_attach () from
/usr/local/pypy-2.6/bin//libpypy-c.so
#4 0x07f4e08f801b663a in ?? ()
#5 0x0000000000000000 in ?? ()
I will need to translate an unstripped pypy to debug further.
Regards,
David
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ pypy-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-dev
