This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug exp/17648] New: segfault calling function returning object with multiple ctors
- From: "skobes at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 25 Nov 2014 23:28:28 +0000
- Subject: [Bug exp/17648] New: segfault calling function returning object with multiple ctors
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17648
Bug ID: 17648
Summary: segfault calling function returning object with
multiple ctors
Product: gdb
Version: 7.8
Status: NEW
Severity: normal
Priority: P2
Component: exp
Assignee: unassigned at sourceware dot org
Reporter: skobes at google dot com
I have the following program:
// wtf.cc
struct A { };
struct B {
B() : f(0) { }
B(A a) : f(0) { }
int f;
};
B crash() { return B(); }
int main(int argc, char** argv) { }
I compile it and start gdb:
$ g++ -O0 -g -c wtf.cc -o wtf.o
$ g++ -o wtf wtf.o
$ gdb --args wtf
Inside gdb I run:
(gdb) break main
Breakpoint 1 at 0x400511: file wtf.cc, line 9.
(gdb) run
Starting program: /tmp/gdbcrash/wtf
Breakpoint 1, main (argc=1, argv=0x7fffffffdd38) at wtf.cc:9
9 int main(int argc, char** argv) { }
(gdb) p crash()
Segmentation fault (core dumped)
--
You are receiving this mail because:
You are on the CC list for the bug.