This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18240] New: hcreate((size_t)-1) should fail with ENOMEM
- From: "nszabolcs at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 10 Apr 2015 11:30:01 +0000
- Subject: [Bug libc/18240] New: hcreate((size_t)-1) should fail with ENOMEM
- Auto-submitted: auto-generated
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.