public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug string/29546] New: sigdescr_np for SIGEMT is useless
@ 2022-09-03 11:40 bruno at clisp dot org
  2022-09-03 11:41 ` [Bug string/29546] " bruno at clisp dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bruno at clisp dot org @ 2022-09-03 11:40 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 29546
           Summary: sigdescr_np for SIGEMT is useless
           Product: glibc
           Version: 2.34
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: string
          Assignee: unassigned at sourceware dot org
          Reporter: bruno at clisp dot org
  Target Milestone: ---

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

The function sigdescr_np is supposed to "return the message describing the
signal signum", see
https://www.gnu.org/software/libc/manual/html_node/Signal-Messages.html.

However, for the value SIGEMT, it returns a string without real information.
If a user did not know what SIGEMT means before, he won't know it afterwards.

How to reproduce:
$ gcc -Wall foo.c
$ ./a.out
SIGEMT -> EMT trap

Suggestion: Use the description string "Instruction emulation needed" instead.
That's what is understandable from the FreeBSD man page
https://www.freebsd.org/cgi/man.cgi?sektion=3&query=signal .

Seen on
- Debian GNU/Hurd, with glibc 2.34.
- Linux/sparc64, with glibc 2.33.

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

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

* [Bug string/29546] sigdescr_np for SIGEMT is useless
  2022-09-03 11:40 [Bug string/29546] New: sigdescr_np for SIGEMT is useless bruno at clisp dot org
@ 2022-09-03 11:41 ` bruno at clisp dot org
  2022-09-05 11:34 ` fweimer at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bruno at clisp dot org @ 2022-09-03 11:41 UTC (permalink / raw)
  To: glibc-bugs

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

Bruno Haible <bruno at clisp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Host|                            |i386-gnu, sparc64-linux-gnu

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

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

* [Bug string/29546] sigdescr_np for SIGEMT is useless
  2022-09-03 11:40 [Bug string/29546] New: sigdescr_np for SIGEMT is useless bruno at clisp dot org
  2022-09-03 11:41 ` [Bug string/29546] " bruno at clisp dot org
@ 2022-09-05 11:34 ` fweimer at redhat dot com
  2022-09-06  1:04 ` bruno at clisp dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2022-09-05 11:34 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-09-05
                 CC|                            |fweimer at redhat dot com
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
It looks like SIGEMT is a generally-available signal, much like SIGUSR1 and
SIGUSR2.  Linux uses it only on MIPS for emulation purposes, I think. It takes
a lot of squinting to consider the (deprecated) SPARC usage a valid emulation
trap. There do not seem to be any actual uses in the Debian corpus, so that
doesn't provide guidance, either.

In what context did you come across this signal, and why was the string "EMT"
not descriptive there?

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

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

* [Bug string/29546] sigdescr_np for SIGEMT is useless
  2022-09-03 11:40 [Bug string/29546] New: sigdescr_np for SIGEMT is useless bruno at clisp dot org
  2022-09-03 11:41 ` [Bug string/29546] " bruno at clisp dot org
  2022-09-05 11:34 ` fweimer at redhat dot com
@ 2022-09-06  1:04 ` bruno at clisp dot org
  2022-09-06 10:31 ` fweimer at redhat dot com
  2022-09-06 11:01 ` bruno at clisp dot org
  4 siblings, 0 replies; 6+ messages in thread
From: bruno at clisp dot org @ 2022-09-06  1:04 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Bruno Haible <bruno at clisp dot org> ---
> In what context did you come across this signal, and why was the string "EMT" not descriptive there?

I haven't seen this signal being sent to a process. Rather, I was looking at
the meta-information, namely how to best define sigdescr_np for Gnulib.

On Linux/SPARC, it seems to be used for "tagged arithmetic overflow".
On Linux/MIPS, for MIPS R2 instruction emulation.
On Hurd, it is what the Mach error EXC_EMULATION ("Emulation support
instruction encountered") translates to.

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

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

* [Bug string/29546] sigdescr_np for SIGEMT is useless
  2022-09-03 11:40 [Bug string/29546] New: sigdescr_np for SIGEMT is useless bruno at clisp dot org
                   ` (2 preceding siblings ...)
  2022-09-06  1:04 ` bruno at clisp dot org
@ 2022-09-06 10:31 ` fweimer at redhat dot com
  2022-09-06 11:01 ` bruno at clisp dot org
  4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2022-09-06 10:31 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
In this case, I think we should not make a change. Due to lack of kernel
support on most architectures, it seems unlikely that users encounter this as a
bona-fide emulation trap. It's more likely the symbol is used for something
else.

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

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

* [Bug string/29546] sigdescr_np for SIGEMT is useless
  2022-09-03 11:40 [Bug string/29546] New: sigdescr_np for SIGEMT is useless bruno at clisp dot org
                   ` (3 preceding siblings ...)
  2022-09-06 10:31 ` fweimer at redhat dot com
@ 2022-09-06 11:01 ` bruno at clisp dot org
  4 siblings, 0 replies; 6+ messages in thread
From: bruno at clisp dot org @ 2022-09-06 11:01 UTC (permalink / raw)
  To: glibc-bugs

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

Bruno Haible <bruno at clisp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #4 from Bruno Haible <bruno at clisp dot org> ---
OK.

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

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

end of thread, other threads:[~2022-09-06 11:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-03 11:40 [Bug string/29546] New: sigdescr_np for SIGEMT is useless bruno at clisp dot org
2022-09-03 11:41 ` [Bug string/29546] " bruno at clisp dot org
2022-09-05 11:34 ` fweimer at redhat dot com
2022-09-06  1:04 ` bruno at clisp dot org
2022-09-06 10:31 ` fweimer at redhat dot com
2022-09-06 11:01 ` 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).