public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31080] New: strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
@ 2023-11-21 14:50 bruno at clisp dot org
  2023-11-21 14:51 ` [Bug libc/31080] " bruno at clisp dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bruno at clisp dot org @ 2023-11-21 14:50 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 31080
           Summary: strerrorname_np and strerror don't know about ENOSYM
                    and EREMOTERELEASE on Linux/hppa
           Product: glibc
           Version: 2.37
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: bruno at clisp dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 15225
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15225&action=edit
test case foo.c

The function strerrorname_np is supposed to return non-NULL for all defined
errno values.
https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html

On Linux/hppa, for the errnos with names
  ENOSYM
  EREMOTERELEASE
it returns NULL.

$ grep -rw ENOSYM /usr/include
/usr/include/asm/errno.h:#define ENOSYM         215     /* symbol does not
exist in executable */
$ grep -rw EREMOTERELEASE /usr/include 
/usr/include/asm/errno.h:#define        EREMOTERELEASE  240     /* Remote peer
released connection */

How to reproduce:
$ gcc -Wall foo.c
$ ./a.out

Expected output:
strerrorname_np (ENOSYM) = "ENOSYM"
strerrorname_np (EREMOTERELEASE) = "EREMOTERELEASE"
strerror (ENOSYM) = Symbol does not exist in executable
strerror (EREMOTERELEASE) = Remote peer released connection

Actual output:
strerrorname_np (ENOSYM) = (null)
strerrorname_np (EREMOTERELEASE) = (null)
strerror (ENOSYM) = Unknown error 215
strerror (EREMOTERELEASE) = Unknown error 240


Seen on T2-SDE Linux, with glibc 2.37.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-11-23 19:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21 14:50 [Bug libc/31080] New: strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa bruno at clisp dot org
2023-11-21 14:51 ` [Bug libc/31080] " bruno at clisp dot org
2023-11-21 15:00 ` adhemerval.zanella at linaro dot org
2023-11-21 15:28 ` bruno at clisp dot org
2023-11-23 11:42 ` sam at gentoo dot org
2023-11-23 11:43 ` sam at gentoo dot org
2023-11-23 16:44 ` danglin at gcc dot gnu.org
2023-11-23 19:43 ` deller at gmx dot de
2023-11-23 19:56 ` bruno at clisp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).