This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A test for vfork


>>>>> Andreas Schwab writes:

 > Here is a test for vfork which should tell you if it is implemented
 > correctly.  Especially the generic source linux/vfork.c is unusable for
 > machines that put the return pc on the stack (like ix86).  Remember that
 > the stack is shared between the parent and the child, thus any function
 > call in the child will clobber the return pc from vfork of the parent.
 > See the existing implementations under sysdeps/unix for hints.

Thanks for the test.  Ulrich, please add it as test in the posix subdirectory!

The tests failed (as already expected) for me:

with glibc 2.0.108:
$ ./vfork-test 
Before vfork
After vfork (parent)

But with glibc 2.0.110 I get:
$ LD_LIBRARY_PATH=/usr/glibc/src/buildreport/19990114/ /usr/glibc/src/buildreport/19990114/elf/ld-linux.so.2 ./vfork-test 
Before vfork
Segmentation fault

Ok, anybody providing an ix86 specific vfork implementation for glibc?

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]