🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Paul Knowles Tue, 20 Dec 2005 16:55
gdb segfault, for x86_64 smp arch, and gcc 4.0.1.
#1198
Author: Paul Knowles
Date: Tue, 20 Dec 2005 16:55
55 lines
2699 bytes

/*
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;
}
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads