public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug tdep/27172] [-m32] FAIL: gdb.arch/i386-mpx-sigsegv.exp: MPX signal segv Lower: 0
Date: Mon, 18 Jan 2021 08:32:42 +0000	[thread overview]
Message-ID: <bug-27172-4717-vWCPU4mg74@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27172-4717@http.sourceware.org/bugzilla/>

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

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d3d7d1ba3bbf899bd318a6d4e63ba24534ad5e86

commit d3d7d1ba3bbf899bd318a6d4e63ba24534ad5e86
Author: Tom de Vries <tdevries@suse.de>
Date:   Mon Jan 18 09:32:38 2021 +0100

    [gdb/tdep] Handle si_addr_bnd in compat_siginfo_from_siginfo

    When running test-case gdb.arch/i386-mpx-sigsegv.exp with target board
    unix/-m32, we run into:
    ...
    (gdb) continue^M
    Continuing.^M
    Saw a #BR! status 1 at 0x8048c2d^M
    ^M
    Program received signal SIGSEGV, Segmentation fault^M
    Upper bound violation while accessing address 0x0804c15c^M
    Bounds: [lower = 0x00000000, upper = 0x00000000].^M
    0x08048a4f in lower (p=0x804c160, a=0x804c180, b=0x804c1a0, c=0x804c1c0, \
      d=0x804c1e0, len=1) at i386-mpx-sigsegv.c:79^M
    79        value = *(p - len);^M
    (gdb) FAIL: gdb.arch/i386-mpx-sigsegv.exp: MPX signal segv Lower: 0
    ...

    The problem is that lower and upper in the Bounds message are 0x0, which is
    caused by $_siginfo._sifields._sigfault._addr_bnd.{_lower,_upper}
evaluating
    to 0x0.

    Fix this by copying the si_lower/si_upper fields in
    compat_siginfo_from_siginfo.

    Tested on x86_64-linux, with target board unix/-m32.

    gdb/ChangeLog:

    2021-01-18  Tom de Vries  <tdevries@suse.de>

            PR tdep/27172
            * nat/amd64-linux-siginfo.c (cpt_si_lower, cpt_si_upper,
SEGV_BNDERR):
            New macro.
            (compat_siginfo_from_siginfo): Copy cpt_si_lower and cpt_si_upper
            for SEGV_BNDERR.

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

  parent reply	other threads:[~2021-01-18  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 10:19 [Bug tdep/27172] New: " vries at gcc dot gnu.org
2021-01-11 10:19 ` [Bug tdep/27172] " vries at gcc dot gnu.org
2021-01-11 10:33 ` vries at gcc dot gnu.org
2021-01-18  8:32 ` cvs-commit at gcc dot gnu.org [this message]
2021-01-18  8:37 ` 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-27172-4717-vWCPU4mg74@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).