pthread_atfork on ppc64
David Woodhouse
dwmw2 at infradead.org
Sat Jun 2 12:53:27 UTC 2012
On Sat, 2012-06-02 at 13:30 +0100, Richard W.M. Jones wrote:
>
> echo 'let _ = Thread.create' > test.ml
> ocamlc -thread unix.cma threads.cma test.ml -o test
>
> On x86-64 there is no output and the program compiles and links.
> ...
> On x86-64, there is an unversioned pthread_atfork symbol in
> libpthread.so.0:
>
> $ nm -D /usr/lib64/libpthread.so.0 | grep pthread_atfork
> 0000003e8ac0ca90 T pthread_atfork
That sounds like a bug to me, on x86_64. AFAICT from what you've shown
(and ryanarn's post), it *shouldn't* link and run on x86_64. The
pthread_atfork function shouldn't be available for linkage by new
executables; only for dynamic linking by *old* executables which
specifically link against pthread_atfork at GLIBC_2.2.5 or
pthread_atfork at GLIBC_2.2.
$ readelf -a /lib64/libpthread.so.0 | grep pthread_atfork
128: 000000338240d000 28 FUNC GLOBAL DEFAULT 13 pthread_atfork at GLIBC_2.2.5
253: 0000000000000000 0 FILE LOCAL DEFAULT ABS old_pthread_atfork.c
355: 000000338240d000 28 FUNC LOCAL DEFAULT 13 __dyn_pthread_atfork
698: 000000338240d000 28 FUNC GLOBAL DEFAULT 13 pthread_atfork at GLIBC_2.2.
This is a question for Uli, really.
--
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6171 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/ppc/attachments/20120602/c06c508c/attachment.bin>
More information about the ppc
mailing list