public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug threads/26228] FAIL: gdb.threads/create-fail.exp: iteration x: run till end (SIG32)
Date: Sat, 11 Jul 2020 09:11:32 +0000	[thread overview]
Message-ID: <bug-26228-4717-liMQFs1ueS@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-26228-4717@http.sourceware.org/bugzilla/>

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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
My understanding of what happens is as follows:

Glibc internally defines SIGCANCEL:
...
./sysdeps/unix/sysv/linux/internal-signals.h:#define SIGCANCEL       __SIGRTMIN
...
which get the value 32:
...
./bits/signum-arch.h:#define __SIGRTMIN 32
...

During the test, the signal arrives at gdb.

GDB has the following behaviour:
...
$ gdb -batch -ex "info handle"
Signal        Stop      Print   Pass to program Description
   ...
SIGCANCEL     No        No      Yes             LWP internal signal
SIG32         Yes       Yes     Yes             Real-time event 32
...

In gdb_signal_from_host we translate the signal with value 32 into a gdb
signal.  There is a bit:
...
#if defined (SIGCANCEL)   
  if (hostsig == SIGCANCEL)
    return GDB_SIGNAL_CANCEL;
#endif
...
but that is not actived, because SIGCANCEL is not defined (because it's an
glibc-internal signal).

This gets actived instead:
...
      else if (hostsig == 32)
        return GDB_SIGNAL_REALTIME_32;
...

So, instead of the appropriate Stop=No behaviour of SIGCANCEL, we have the
Stop=Yes behaviour of SIG32, and the test-case FAILs.

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

  parent reply	other threads:[~2020-07-11  9:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-11  8:35 [Bug threads/26228] New: " vries at gcc dot gnu.org
2020-07-11  8:52 ` [Bug threads/26228] " vries at gcc dot gnu.org
2020-07-11  9:11 ` vries at gcc dot gnu.org [this message]
2020-07-24 13:59 ` vries at gcc dot gnu.org
2021-02-01 21:44 ` vries at gcc dot gnu.org
2021-02-02 11:55 ` luis.machado at linaro dot org
2021-02-04 13:27 ` vries at gcc dot gnu.org
2021-02-04 14:11 ` luis.machado at linaro dot org
2021-02-04 14:15 ` vries at gcc dot gnu.org
2021-02-04 14:24 ` luis.machado at linaro dot org
2021-02-04 17:27 ` vries at gcc dot gnu.org
2021-02-12 19:12 ` cvs-commit at gcc dot gnu.org
2021-02-12 19:13 ` vries at gcc dot gnu.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-26228-4717-liMQFs1ueS@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).