bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdb segfault, for x86_64 smp arch, and gcc 4.0.1.


From: Paul Knowles
Subject: gdb segfault, for x86_64 smp arch, and gcc 4.0.1.
Date: Tue, 20 Dec 2005 17:55:41 +0100


/*
Hello all,
     Here is a gdb bug verified for x86_64 smp arch with gcc 4.0.1.
     I understand this is somewhat exotic hardware. 
     I will just use gcc32 for the time being, 
     I have no time for further chasing of this.

 for the program fragment below:

 $(CC) gdb_bug.c        -o poo  \
 $(CC) gdb_bug.c -ggdb  -o poo   \   executibles in class
 $(CC) gdb_bug.c -ggdb1 -o poo   /   `works'
 $(CC) gdb_bug.c -ggdb2 -o poo  /

 $(CC) gdb_bug.c -ggdb3 -o foo  }    undebugable for gcc v4.0.1

 $(CC) is either gcc or gcc32
 version info
 gcc (GCC) 4.0.1 20050727 (Red Hat 4.0.1-5)
 gcc32 (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-47.fc4)
 GNU gdb Red Hat Linux (6.3.0.0-1.84rh)

 uname -a:
 Linux 2.6.13-1.1532_FC4smp #1 SMP Thu Oct 20 01:42:06 EDT 2005 x86_64 x86_64 
x86_64 GNU/Linux on x86_64

 invoke gdb: "file poo", "p g", "p bob[2]" -> works as expected

 if foo compiled with gcc version 4.0.1, with -ggdb3,
             "file foo", "p g" -> gdb segfaults
             in fact, p anything causes segfault.

 Also tested gcc 3.2.2 and 4.0.0 on i686 with gdb Red Hat Linux
 (6.1post-1.20040607.43.0.1rh): no problems.

 */
#include <stdio.h>

static void * p1=NULL;
int g=7;

struct boo{
     int a;
     int *b;
}bob[20]={
     {0,NULL},
     {5,NULL},
     {23,&g},
};

int main(void)
{
        return 0;
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]