This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15846] New: getauxval api is broken
- From: "bugdal at aerifal dot cx" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 17 Aug 2013 23:54:09 +0000
- Subject: [Bug libc/15846] New: getauxval api is broken
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15846
Bug ID: 15846
Summary: getauxval api is broken
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: bugdal at aerifal dot cx
CC: drepper.fsp at gmail dot com
getauxval is documented to (and does) return 0 if the requested item is not
found. Unfortunately, 0 is also a valid value for many items, e.g.
getauxval(AT_UID), or perhaps worse, getauxval(AT_EXECFD).
Ideally, the error return should be changed to something not otherwise
used/usable, e.g. -1UL. Short of that, perhaps getauxval could at least set
errno to ENOENT when the item is not found and guarantee that errno will be
undisturbed on success.
--
You are receiving this mail because:
You are on the CC list for the bug.