Bug 1466105 - SIGSEGV if stepi at vmovdqa
SIGSEGV if stepi at vmovdqa
Status: NEW
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
27
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-29 00:26 EDT by John Reiser
Modified: 2017-11-19 21:51 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
45-line C program (12 SLOC, 33 comments) illustrating stepi at vmovdqa (1.76 KB, text/x-csrc)
2017-06-29 00:26 EDT, John Reiser
no flags Details

  None (edit)
Description John Reiser 2017-06-29 00:26:54 EDT
Created attachment 1292776 [details]
45-line C program (12 SLOC, 33 comments) illustrating stepi at vmovdqa

Description of problem: If a 'vmovdqa' instruction is the target of a 'stepi' (single-step one instruction) or a 'continue' after a breakpoint, then a spurious SIGSEGV can be generated in the target program, even though free-running execution (no stepi, no continue) gets no SIGSEGV.


Version-Release number of selected component (if applicable):
gdb-7.12.1-48.fc25.x86_64
kernel-4.11.6-201.fc25.x86_64


How reproducible: every time


Steps to Reproduce:
1. Compile and link the attached program.  The critical instruction is
   (gdb) x/i main
   0x4004a6 <main>:	vmovdqa 0xc2(%rip),%xmm0        # 0x400570
   The instruction byte stream is
   (gdb) x/2xw main
   0x4004a6 <main>:	0x056ff9c5	0x000000c2

2. Run under gdb, and stepi or continue after a breakpoint at the 'vmovdqa'
3.

Actual results: 
Program received signal SIGSEGV, Segmentation fault.
main (argc=0x1, argv=0x7fffffffdfa8) at prefix-sum-sse.c:39
39	    x = _mm_add_epi8(x, _mm_srli_si128(x, 1));
(gdb) x/i $pc
=> 0x4004a6 <main>:	vmovdqa 0xc2(%rip),%xmm0        # 0x400570


Expected results: no SIGSEGV, which is the behavior when not using gdb, or when no stepi and no continue-after-breakpoint in gdb.


Additional info: The alignment of the memory operand at 0x400570 is (0 mod 16) which is the natural alignment of "double quad word" ==> (2 * 4 * 2) bytes
Comment 1 Fedora End Of Life 2017-11-16 13:50:38 EST
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 2 John Reiser 2017-11-19 21:51:51 EST
The problem persists with:
  GNU gdb (GDB) Fedora 8.0.1-30.fc27
  kernel-4.13.12-300.fc27.x86_64

Note You need to log in before you can comment on or make changes to this bug.