public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bruno at clisp dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/31080] New: strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
Date: Tue, 21 Nov 2023 14:50:49 +0000	[thread overview]
Message-ID: <bug-31080-131@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2023-11-21 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21 14:50 bruno at clisp dot org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31080-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).