This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12847] dprintf/vdprintf can cause fork to fail (child process crash)
- From: "freker at zes dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 15 Jul 2013 19:42:55 +0000
- Subject: [Bug libc/12847] dprintf/vdprintf can cause fork to fail (child process crash)
- Auto-submitted: auto-generated
- References: <bug-12847-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12847
Frank Reker <freker at zes dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
CC| |freker at zes dot com
Resolution|FIXED |---
--- Comment #3 from Frank Reker <freker at zes dot com> ---
Sorry,
maybe I'm blind, but where is the patch?
I still do encounter the problem in version 2.17 from 25th dec. 2012.
The fresetlockfile function (nptl/sysdeps/unix/sysv/linux/fork.c) that fails:
----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------
and the code in
_IO_vdprintf
----snip-----
struct _IO_FILE_plus tmpfil;
struct _IO_wide_data wd;
int done;
#ifdef _IO_MTSAFE_IO
tmpfil.file._lock = NULL;
#endif
_IO_no_init (&tmpfil.file, _IO_USER_LOCK, 0, &wd, &_IO_wfile_jumps);
_IO_JUMPS (&tmpfil) = &_IO_file_jumps;
_IO_file_init (&tmpfil);
----snap-----
The _lock here is explicitely set to NULL and _IO_file_init
links the struct to the chain: _IO_list_all
--
You are receiving this mail because:
You are on the CC list for the bug.