This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4067] possible problem in sigaction resulting into segfault
- From: "nico-linux-glibc at schottelius dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 17 Feb 2007 19:53:57 -0000
- Subject: [Bug libc/4067] possible problem in sigaction resulting into segfault
- References: <20070216223621.4067.nico-linux-glibc@schottelius.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From nico-linux-glibc at schottelius dot org 2007-02-17 19:53 -------
Sorry, used the wrong version with initialized flags. glibc-2.5 also segfaults,
if sa.flags is uninitialized. Use this code to reproduce:
---------------------------
struct sigaction sa;
if(action == ACT_SERV) {
sa.sa_handler = sig_child;
// sa.sa_flags = SA_NOCLDSTOP;
} else {
sa.sa_handler=SIG_DFL;
// sa.sa_flags = 0;
}
// sigemptyset(&sa.sa_mask);
sigaction(SIGCHLD,&sa,NULL); /* what todo when a child exited */
---------------------------
And then fork() away and tada: segfault _after_ the sigchild handler exits.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|VERIFIED |REOPENED
Resolution|FIXED |
http://sourceware.org/bugzilla/show_bug.cgi?id=4067
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.