exp/1973: Crash when excess initializers for class are specified

ghost@cs.msu.su ghost@cs.msu.su
Wed Jul 20 10:38:00 GMT 2005


>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:



More information about the Gdb-prs mailing list