This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/4635] New: sigandset(), sigorset() and sigisemptyset() functions crash if one of the parameters is NULL
- From: "lex at ispras dot ru" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 13 Jun 2007 11:51:49 -0000
- Subject: [Bug libc/4635] New: sigandset(), sigorset() and sigisemptyset() functions crash if one of the parameters is NULL
- Reply-to: sourceware-bugzilla at sourceware dot org
The LSB 3.1 description of sigandset() function specifies that if one or more
of the function parameters was a null pointer then EINVAL error shall occure.
But on SLES 10 this function crashes in this case (libc version 2.4). Buy the
way, on Red Hat 4 64 bits (libc version 2.3.4) it works as specified in LSB 3.1.
The same is truth about sigorset() and sigisemptyset() functions.
Below is the example code.
#include <stdio.h>
#include <signal.h>
int main(int argc, char* argv[])
{
sigset_t set;
sigemptyset(&set);
int res1 = sigandset(&set, &set, &set); // OK
int res2 = sigandset(&set, &set, NULL); // CRASH
int res3 = sigorset(&set, &set, &set); // OK
int res4 = sigorset(&set, NULL, &set); // CRASH
int res5 = sigisemptyset(&set); // OK
int res6 = sigisemptyset(NULL); // CRASH
return 0;
}
--
Summary: sigandset(), sigorset() and sigisemptyset() functions
crash if one of the parameters is NULL
Product: glibc
Version: 2.4
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: lex at ispras dot ru
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=4635
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.