This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
exp/1973: Crash when excess initializers for class are specified
- From: ghost at cs dot msu dot su
- To: gdb-gnats at sources dot redhat dot com
- Date: 20 Jul 2005 10:31:49 -0000
- Subject: exp/1973: Crash when excess initializers for class are specified
- Reply-to: ghost at cs dot msu dot su
>Number: 1973
>Category: exp
>Synopsis: Crash when excess initializers for class are specified
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 20 10:38:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator: Vladimir Prus
>Release: 6.3
>Organization:
>Environment:
Debian Linux
>Description:
It looks like assigning to a class variable with excess initializers leads to segfault.
>How-To-Repeat:
Example program:
struct B { int i; int j; static int k; };
int main()
{
B b;
return 0;
}
compile with g++ -g a.cpp
Example gdb session:
(gdb) b main
Breakpoint 1 at 0x8048394: file a.cpp, line 7.
(gdb) r
Starting program: /home/ghost/Work/Module/kdevelop/languages/cpp/debugger/tests/print_pointers/a.out
Breakpoint 1, main () at a.cpp:7
7 return 0;
(gdb) set var b={1,2,3}
Segmentation fault
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: