Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Terje Eggestad <terje.eggestad@scali.com>
To: Michal Ludvig <mludvig@suse.cz>,
	Eli Zaretskii <eliz@is.elta.co.il>,
	Michael Snyder <msnyder@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Strange segfaults of gdb
Date: Thu, 12 Dec 2002 16:36:00 -0000	[thread overview]
Message-ID: <1039739774.8645.18.camel@eggis1> (raw)

Hi 

Back in April you guys had a short discussion on strange segfaults in
gdb:
http://sources.redhat.com/ml/gdb/2002-04/msg00168.html

It seems that I can reliably reproduce it when you link with pthread.
See below.

It seem that it segfaults on the first or second instruction *byte*, NOT
the next instruction... (according to info registers, just before and
after attempted single step.) 

Anyone know whom to report this to?

Running SuSE 8.0.99 beta with the latest gcc,gdb,glibc updates.

Terje





 
te mjollnir testdl 134> cat main.c
main()
{
        int i;

        i = 2;
        i += 4;
        i *= 3;
        exit(i);
};

te mjollnir testdl 135> gcc -v
Reading specs from /usr/lib64/gcc-lib/x86_64-suse-linux/3.2.1/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr
--with-local-prefix=/usr/local --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64
--enable-languages=c,c++,f77,objc,java,ada --enable-libgcj
--with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib
--with-system-zlib --enable-shared --enable-__cxa_atexit
x86_64-suse-linux
Thread model: posix
gcc version 3.2.1 20021002 (prerelease) (SuSE Linux)
te mjollnir testdl 136> gcc -g -o main main.c
te mjollnir testdl 137> gdb main
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-suse-linux"...
(gdb) break main
Breakpoint 1 at 0x400460: file main.c, line 5.
(gdb) run
Starting program: /home/te/test/testdl/main 

Breakpoint 1, main () at main.c:5
5               i = 2;
(gdb) n
6               i += 4;
(gdb) 
7               i *= 3;
(gdb) 
8               exit(i);
(gdb) 

Program exited with code 022.
(gdb) q
te mjollnir testdl 138> gcc -g -o main main.c -lpthread
te mjollnir testdl 139> gdb -q main
(gdb) break main
Breakpoint 1 at 0x4004a0: file main.c, line 5.
(gdb) run
Starting program: /home/te/test/testdl/main 
[New Thread 1024 (LWP 6458)]
[Switching to Thread 1024 (LWP 6458)]

Breakpoint 1, 0x004004a1 in main () at main.c:5
5               i = 2;
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x004004a3 in main () at main.c:5
5               i = 2;
(gdb) q
The program is running.  Exit anyway? (y or n) y
te mjollnir testdl 140> 




-- 
_________________________________________________________________________

Terje Eggestad                  mailto:terje.eggestad@scali.no
Scali Scalable Linux Systems    http://www.scali.com

Olaf Helsets Vei 6              tel:    +47 22 62 89 61 (OFFICE)
P.O.Box 150, Oppsal                     +47 975 31 574  (MOBILE)
N-0619 Oslo                     fax:    +47 22 62 89 51
NORWAY            
_________________________________________________________________________


             reply	other threads:[~2002-12-13  0:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-12 16:36 Terje Eggestad [this message]
2002-12-13  9:59 ` Michal Ludvig
     [not found]   ` <1039817373.10496.19.camel@eggis1>
2002-12-14  6:09     ` Michal Ludvig
  -- strict thread matches above, loose matches on Subject: below --
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
2002-04-16 11:16     ` Michael Snyder
2002-04-17  3:12       ` 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=1039739774.8645.18.camel@eggis1 \
    --to=terje.eggestad@scali.com \
    --cc=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.com \
    --cc=mludvig@suse.cz \
    --cc=msnyder@redhat.com \
    /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