This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/18240] New: hcreate((size_t)-1) should fail with ENOMEM


https://sourceware.org/bugzilla/show_bug.cgi?id=18240

            Bug ID: 18240
           Summary: hcreate((size_t)-1) should fail with ENOMEM
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: nszabolcs at gmail dot com
                CC: drepper.fsp at gmail dot com

the following code prints:
hcreate((size_t)-1) returned 1, expected 0 with ENOMEM


#define _XOPEN_SOURCE 700
#include <search.h>
#include <stdio.h>
int main()
{
int r = hcreate(-1);
if (r)
        printf("hcreate((size_t)-1) returned %d, expected 0 with ENOMEM\n", r);
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]