public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tdep/27172] New: [-m32] FAIL: gdb.arch/i386-mpx-sigsegv.exp: MPX signal segv Lower: 0
@ 2021-01-11 10:19 vries at gcc dot gnu.org
  2021-01-11 10:19 ` [Bug tdep/27172] " vries at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2021-01-11 10:19 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27172
           Summary: [-m32] FAIL: gdb.arch/i386-mpx-sigsegv.exp: MPX signal
                    segv Lower: 0
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tdep
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

When running test-case gdb.arch/i386-mpx-sigsegv.exp with target board
unix/-m32, we run into:
...
FAIL: gdb.arch/i386-mpx-sigsegv.exp: MPX signal segv Lower: 0
...

In more detail:
...
(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
/home/vries/gdb_versions/devel/src/gdb/testsuite/gdb.arch/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 FAIL is due to the fact that we expect a "Lower bound violation" message,
but instead get an "Upper bound violation".

The message comes from i386_linux_report_signal_info, where upper/lower is
determined by:
...
  is_upper = (access > upper_bound ? 1 : 0);
...

So, given that access == 0x0804c15c and upper_bound == 0x0, is_upper evaluates
to true.

In other words, the incorrect message is caused by
$_siginfo._sifields._sigfault._addr_bnd._upper evaluating to 0x0.

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

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

end of thread, other threads:[~2021-01-18  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 10:19 [Bug tdep/27172] New: [-m32] FAIL: gdb.arch/i386-mpx-sigsegv.exp: MPX signal segv Lower: 0 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
2021-01-18  8:37 ` vries at gcc dot gnu.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).