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/15846] New: getauxval api is broken


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.


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