Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb@sourceware.org, Tom Tromey <tromey@redhat.com>,
	        Doug Evans <dje@google.com>
Subject: Re: [gdb-7.0 release] 2009-09-02 status and proposed plan
Date: Fri, 04 Sep 2009 17:59:00 -0000	[thread overview]
Message-ID: <8ac60eac0909041059y4541a7ct89c62ce636453cf6@mail.gmail.com> (raw)
In-Reply-To: <8ac60eac0909040825u25ce064co34550210ec2e5f11@mail.gmail.com>

On Fri, Sep 4, 2009 at 8:25 AM, Paul Pluzhnikov<ppluzhnikov@google.com> wrote:

> I am still working on a stand-alone repro case.

Here it is:

--- cut --- foo.cc ---
#include <stdio.h>

#define X6(a) a,a,a,a,a,a
#define R8(a) a##a##a##a##a##a##a##a##a

#define Foo R8(Fee_Fi_Fo_Fum_I_smell_the_blood_of_an_Englishman)
#define Bar R8(Bar)

template <class P, class Q, class R, class S, class T, class U>
struct Foo { Foo(); };

template <class P, class Q, class R, class S, class T, class U>
Foo<P, Q, R, S, T, U>::Foo()
{
  printf ("In %s\n", __func__);
}

struct Bar { };

typedef Foo<X6(Bar)> FooBar1;
typedef Foo<X6(FooBar1)> FooBar2;
typedef Foo<X6(FooBar2)> FooBar3;
typedef Foo<X6(FooBar3)> FooBar4;
typedef Foo<X6(FooBar4)> FooBar5;

struct Zork { int x; };

int fn(int *ip)
{
  FooBar1 f1;
  FooBar2 f2;
  FooBar3 f3;
  FooBar4 f4;
  FooBar5 f5;

  Zork z;
  z.x = ip[0]; // crash
  return z.x;
}
--- cut --- foo.cc ---

--- cut --- main.cc ---
int fn(int *);
int main() { return fn(0); }
--- cut --- main.cc ---

g++ -g -fPIC -shared foo.cc -o foo.so && g++ -g main.cc ./foo.so

gdb64-cvs ./a.out
GNU gdb (GDB) 6.8.50.20090904-cvs
...
Reading symbols from /usr/local/google/tmp/gdb-crash/a.out...done.
(gdb) run
In Fee_Fi_Fo_Fum_I_smell...

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bdf1d9 in fn (ip=0x0) at foo.cc:37
37	  z.x = ip[0]; // crash

(gdb) py x = gdb.lookup_type('Zork')
(gdb) run
Segmentation fault (core dumped)

I will not be able to work on a fix before next Tuesday, so if anybody
fixes this before then, please let me know.

Thanks,
-- 
Paul Pluzhnikov


  reply	other threads:[~2009-09-04 17:59 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 16:44 Joel Brobecker
2009-09-02 17:09 ` Jack Howarth
2009-09-02 17:18   ` Joel Brobecker
2009-09-03  8:58   ` Tristan Gingold
2009-09-02 19:28 ` Tom Tromey
2009-09-03  3:18   ` Eli Zaretskii
2009-09-03  3:30     ` Hui Zhu
2009-09-04 15:48       ` Sérgio Durigan Júnior
2009-09-03 19:28     ` Joel Brobecker
2009-09-03 19:53       ` Tom Tromey
2009-09-03 21:35         ` Joel Brobecker
2009-09-04 15:44           ` Tom Tromey
2009-09-04 21:34             ` Sérgio Durigan Júnior
2009-09-04 21:37         ` Sérgio Durigan Júnior
2009-09-04 21:37       ` Sérgio Durigan Júnior
2009-09-03 19:26   ` Joel Brobecker
2009-09-03 20:12     ` Tom Tromey
2009-09-03 20:39       ` Matt Rice
2009-09-03 21:43       ` Joel Brobecker
2009-09-04 15:36     ` Doug Evans
2009-09-03  2:05 ` Hui Zhu
2009-09-03 19:31   ` Joel Brobecker
2009-09-05  0:25   ` Joel Brobecker
2009-09-05  8:13     ` Mark Kettenis
2009-09-05  8:24       ` Jonas Maebe
2009-09-05 15:58       ` Eli Zaretskii
2009-09-03  4:06 ` Doug Evans
2009-09-03 15:54 ` Paul Pluzhnikov
2009-09-03 16:00   ` Pierre Muller
2009-09-03 16:11     ` Paul Pluzhnikov
2009-09-04 10:20       ` Pierre Muller
2009-09-04 15:07         ` Paul Pluzhnikov
2009-09-07 14:58           ` Pierre Muller
     [not found]             ` <8ac60eac0909072137g41f7b1f8q2e9e1e6d6d161fc5@mail.gmail.com>
     [not found]               ` <000301ca309f$35d475d0$a17d6170$@u-strasbg.fr>
2009-09-08 20:41                 ` Paul Pluzhnikov
2009-09-03 19:33   ` Joel Brobecker
2009-09-04 15:25   ` Paul Pluzhnikov
2009-09-04 17:59     ` Paul Pluzhnikov [this message]
2009-09-04 18:03       ` Doug Evans
2009-09-05  0:29         ` Joel Brobecker
2009-09-14 17:43     ` Paul Pluzhnikov
2009-09-14 17:52       ` Joel Brobecker
2009-09-14 18:20         ` Paul Pluzhnikov
2009-09-15 20:28       ` Paul Pluzhnikov
2009-09-03 18:34 ` Anirban Sinha
2009-09-04 23:07 ` Joel Brobecker
2009-09-16  6:47 ` Hui Zhu
     [not found]   ` <F7CE05678329534C957159168FA70DEC5153684DC5@EUSAACMS0703.eamcs.ericsson.se>
2009-09-17  1:02     ` Joel Brobecker

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=8ac60eac0909041059y4541a7ct89c62ce636453cf6@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=brobecker@adacore.com \
    --cc=dje@google.com \
    --cc=gdb@sourceware.org \
    --cc=tromey@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