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

* [Bug libc/31080] strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
  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 ` bruno at clisp dot org
  2023-11-21 15:00 ` adhemerval.zanella at linaro dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bruno at clisp dot org @ 2023-11-21 14:51 UTC (permalink / raw)
  To: glibc-bugs

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

Bruno Haible <bruno at clisp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Host|                            |hppa-unknown-linux-gnu

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

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

* [Bug libc/31080] strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
  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
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2023-11-21 15:00 UTC (permalink / raw)
  To: glibc-bugs

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

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #1 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
This is because they are not defined or described in the error codes [1].  They
also seem not to be returned by the kernel, so not sure how useful adding these
would be for hppa-linux-gnu.

[1] https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html

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

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

* [Bug libc/31080] strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
  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
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bruno at clisp dot org @ 2023-11-21 15:28 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Bruno Haible <bruno at clisp dot org> ---
(In reply to Adhemerval Zanella from comment #1)
> They also seem not to be returned by the kernel

Indeed.

Then you could ask the kernel people to remove these two errnos from
linux/arch/parisc/include/uapi/asm/errno.h. Similar to what has been done with
ENOTSUP in
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/parisc/include/uapi/asm/errno.h?id=93cb8e20d56be40c541475f77b5f565fbb385a4b

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

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

* [Bug libc/31080] strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
  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
                   ` (2 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2023-11-23 11:42 UTC (permalink / raw)
  To: glibc-bugs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

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

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

* [Bug libc/31080] strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
  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
                   ` (3 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: sam at gentoo dot org @ 2023-11-23 11:43 UTC (permalink / raw)
  To: glibc-bugs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danglin at gcc dot gnu.org,
                   |                            |deller at gmx dot de

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

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

* [Bug libc/31080] strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
  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
                   ` (4 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu.org @ 2023-11-23 16:44 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
ENOSYM and EREMOTERELEASE are HP-UX defines and probably can be removed.

/* Things in HP-UX not in XPG3, POSIX or ANSI C */
#ifdef _INCLUDE_HPUX_SOURCE
/* The error numbers between 37 and 44 are not produced by HP-UX. They
   will track whatever the UNIX(tm) system does in the future */
#define ECHRNG  37      /* Channel number out of range          */
#define EL2NSYNC 38     /* Level 2 not synchronized             */
#define EL3HLT  39      /* Level 3 halted                       */
#define EL3RST  40      /* Level 3 reset                        */
#define ELNRNG  41      /* Link number out of range             */
#define EUNATCH 42      /* Protocol driver not attached         */
#define ENOCSI  43      /* No CSI structure available           */
#define EL2HLT  44      /* Level 2 halted                       */

#define ENONET          50      /* Machine is not on the network        */
#define ENOPKG          55      /* Package not installed                */
#define EADV            58      /* advertise error */
#define ESRMNT          59      /* srmount error */
#define ECOMM           60      /* Communication error on send          */
#define EDOTDOT         66      /* Cross mount point (not really error)*/


#define ENOSYM          215     /* symbol does not exist in executable  */

/* disk quotas errors */
#  define       EUSERS   68     /* For Sun compatibilty, will not occur.*/

/* Network File System */
#  define       EREMOTE         71      /* Too many levels of remote in path */

/* ipc/network software */

/* argument errors */
#  define ESOCKTNOSUPPORT       222     /* Socket type not supported */
#  define EPFNOSUPPORT          224     /* Protocol family not supported */

        /* operational errors */
#  define ENETRESET             230     /* Network dropped connection on
                                           reset */
#  define ESHUTDOWN             236     /* Can't send after socket shutdown */
#  define ETOOMANYREFS          237     /* Too many references: can't splice */
#  define EREFUSED              ECONNREFUSED    /* Double define for NFS*/
#  define EREMOTERELEASE        240     /* Remote peer released connection */
#  define EHOSTDOWN             241     /* Host is down */


#endif /* _INCLUDE_HPUX_SOURCE */

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

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

* [Bug libc/31080] strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
  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
                   ` (5 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: deller at gmx dot de @ 2023-11-23 19:43 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from Helge Deller <deller at gmx dot de> ---
I've added a kernel patch to the for-next branch to remove those from parisc's
errno.h file:
https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git/log/?h=for-next

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

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

* [Bug libc/31080] strerrorname_np and strerror don't know about ENOSYM and EREMOTERELEASE on Linux/hppa
  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
                   ` (6 preceding siblings ...)
  2023-11-23 19:43 ` deller at gmx dot de
@ 2023-11-23 19:56 ` bruno at clisp dot org
  7 siblings, 0 replies; 9+ messages in thread
From: bruno at clisp dot org @ 2023-11-23 19:56 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from Bruno Haible <bruno at clisp dot org> ---
(In reply to Helge Deller from comment #4)
> I've added a kernel patch to the for-next branch to remove those from
> parisc's errno.h file:

Thanks! That looks exactly like what is needed.

-- 
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).