This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/2766] New: Implementation of the insque() function does not satisfy POSIX.
- From: "sortov at linuxtesting dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 14 Jun 2006 11:48:30 -0000
- Subject: [Bug libc/2766] New: Implementation of the insque() function does not satisfy POSIX.
- Reply-to: sourceware-bugzilla at sourceware dot org
The POSIX description of the insque() function says that "If the queue is to be
used as a linear list, invoking insque(&element, NULL), where element is the
initial element of the queue, shall initialize the forward and backward
pointers of element to null pointers."
However this function in the current glibc causes the segmentation fault if the
second parameter is NULL.
Example of the code:
#include <stdio.h>
#include <search.h>
typedef struct
{
void* next;
void* prev;
} Node;
int main()
{
Node A;
A.next = NULL;
A.prev = NULL;
insque(&A, NULL);
return 0;
}
--
Summary: Implementation of the insque() function does not satisfy
POSIX.
Product: glibc
Version: 2.4
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: sortov at linuxtesting dot org
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=2766
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.