This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Incorrect IFUNC use in libpthread for fork, vfork wrapper [BZ #19861]
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: Richard Henderson <rth at redhat dot com>
- Date: Wed, 30 Mar 2016 15:18:48 +0200
- Subject: Incorrect IFUNC use in libpthread for fork, vfork wrapper [BZ #19861]
- Authentication-results: sourceware.org; auth=none
The IFUNC use is incorrect because you cannot assume that some other
symbol has been relocated, and the current implementation sometimes
returns an unrelocated address. (The bug is about vfork, but I'm sure
fork has the same issue.)
Is there a reliable test case which exposes this problem? I made the
vfork wrapper in libpthread a non-tail-call, fixed up the nptl vfork
tests to actually call the wrapper (which I assume they currently don't
due to the compat symbol), and still didn't get any crash. I even tried
to add a bit of extra work in the child, to make sure that the stack is
overwritten (but downwards only, obviously).
Any ideas?
Florian