From: "Eli Zaretskii" <eliz@is.elta.co.il>
To: mludvig@suse.cz
Cc: gdb@sources.redhat.com
Subject: Re: Strange segfaults of gdb
Date: Fri, 12 Apr 2002 05:05:00 -0000 [thread overview]
Message-ID: <4331-Fri12Apr2002150053+0300-eliz@is.elta.co.il> (raw)
In-Reply-To: <3CB6C492.80108@suse.cz> (message from Michal Ludvig on Fri, 12 Apr 2002 13:27:14 +0200)
> Date: Fri, 12 Apr 2002 13:27:14 +0200
> From: Michal Ludvig <mludvig@suse.cz>
>
> > What if you run GDB under another GDB--can you see where does the
> > subordinate GDB crash then?
>
> (gdb) p 1
> $1 = 1
> (gdb) r
> Starting program: /root/mludvig/tst/xmmtest
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x2a95ae759c in wait4 () at soinit.c:76
> 76 }
> (top-gdb) disassemble 0x2a95ae759c
It's more useful to type "bt" at this point. Then you will know what
kind of code in GDB called wait4.
> Dump of assembler code for function wait4:
> 0x2a95ae7590 <wait4>: mov %rcx,%r10
> 0x2a95ae7593 <wait4+3>: mov $0x3d,%rax
> 0x2a95ae759a <wait4+10>: syscall
> 0x2a95ae759c <wait4+12>: cmp $0xfffffffffffff001,%rax
> 0x2a95ae75a2 <wait4+18>: jae 0x2a95ae75a5 <wait4+21>
> 0x2a95ae75a4 <wait4+20>: retq
> 0x2a95ae75a5 <wait4+21>: xor %rdx,%rdx
> 0x2a95ae75a8 <wait4+24>: sub %rax,%rdx
> 0x2a95ae75ab <wait4+27>: push %rdx
> 0x2a95ae75ac <wait4+28>: callq 0x2a95a6fa30 <key+145504>
> 0x2a95ae75b1 <wait4+33>: pop %rdx
> 0x2a95ae75b2 <wait4+34>: mov %rdx,(%rax)
> 0x2a95ae75b5 <wait4+37>: or $0xffffffffffffffff,%rax
> 0x2a95ae75b9 <wait4+41>: jmp 0x2a95ae75a4 <wait4+20>
> 0x2a95ae75bb <wait4+43>: nop
> 0x2a95ae75bc <wait4+44>: nop
> 0x2a95ae75bd <wait4+45>: nop
> 0x2a95ae75be <wait4+46>: nop
> 0x2a95ae75bf <wait4+47>: nop
> End of assembler dump.
>
> So it appears like the segfault happend on 'cmp <imm>,<reg>'
> instruction, which shouldn't be able to generate any exception at all.
I suspect that what crashed is the syscall instruction before that:
> Dump of assembler code for function wait4:
> 0x2a95ae7590 <wait4>: mov %rcx,%r10
> 0x2a95ae7593 <wait4+3>: mov $0x3d,%rax
> 0x2a95ae759a <wait4+10>: syscall
> 0x2a95ae759c <wait4+12>: cmp $0xfffffffffffff001,%rax
It is also possible that the stack is somehow blown up, which would
explain why the first instruction after a syscall return crashes.
next prev parent reply other threads:[~2002-04-12 12:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-11 9:12 Michal Ludvig
2002-04-11 14:43 ` Michael Snyder
2002-04-12 2:13 ` Eli Zaretskii
2002-04-12 4:27 ` Michal Ludvig
2002-04-12 5:05 ` Eli Zaretskii [this message]
2002-04-16 11:16 ` Michael Snyder
2002-04-17 3:12 ` Michal Ludvig
2002-12-12 16:36 Terje Eggestad
2002-12-13 9:59 ` Michal Ludvig
[not found] ` <1039817373.10496.19.camel@eggis1>
2002-12-14 6:09 ` Michal Ludvig
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=4331-Fri12Apr2002150053+0300-eliz@is.elta.co.il \
--to=eliz@is.elta.co.il \
--cc=gdb@sources.redhat.com \
--cc=mludvig@suse.cz \
/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