This is the mail archive of the glibc-bugs@sourceware.org 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]
Other format: [Raw text]

[Bug libc/12847] dprintf/vdprintf can cause fork to fail (child process crash)


http://sourceware.org/bugzilla/show_bug.cgi?id=12847

--- Comment #4 from Frank Reker <freker at zes dot com> ---
OK, I've seen your bugfix in genops.c, however
this does not fix the fork() bug. I suggest
to modify:

nptl/sysdeps/unix/sysv/linux/fork.c
----snip-------
static void
fresetlockfiles (void)
{
  _IO_ITER i;

  for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i))
    _IO_lock_init (*((_IO_lock_t *) _IO_iter_file(i)->_lock));
}
----snap------
to:
----snip-------
static void
fresetlockfiles (void)
{
  _IO_ITER i;

  for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i))
    if (_IO_iter_file(i)->_lock) 
       _IO_lock_init (*((_IO_lock_t *) _IO_iter_file(i)->_lock));
}
----snap------

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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