This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 2766
  Implementation of the insque() function does not satisfy POSIX. Last modified: 2006-06-17 17:01:41
     Query page      Enter new bug
Bug#: 2766   Hardware:   Reporter: Alexander A. Sortov <sortov@linuxtesting.org>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: Ulrich Drepper <drepper@redhat.com>   Target Milestone:  
Flags: Requestee:
  backport ()
  examined ()
  testsuite ()
Summary:
Keywords:

Attachment Description Type Created Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 2766 depends on: Show dependency tree
Show dependency graph
Bug 2766 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2006-06-14 11:48
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;
}

------- Additional Comment #1 From Ulrich Drepper 2006-06-17 17:01 -------
Fixed in cvs.

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In