Bug 19138 - c++ segfaults on some bad code.
Summary: c++ segfaults on some bad code.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-15 15:44 UTC by Sam Varshavchik
Modified: 2007-03-27 03:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-10-17 14:10:13 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2000:132 0 normal SHIPPED_LIVE Bug fixing update of GCC 2.96 2000-12-19 05:00:00 UTC

Description Sam Varshavchik 2000-10-15 15:44:40 UTC
The following intentionally bad code causes c++ to segfault:

[mrsam@gwl oak]$ cat t.C

class X {

public:
	X();
	virtual ~X();
}

X::x()
{
}

X::~x()
{
}


[mrsam@gwl oak]$ c++ -Wall -c t.C
t.C:10: ISO C++ forbids defining types within return type
t.C:10: no `X X::x ()' member function declared in class `X'
t.C:10: semicolon missing after declaration of `class X'
t.C: In method `int X::x (X *)':
t.C:11: warning: no return statement in function returning non-void
t.C: At top level:
t.C:14: destructor `x' must match class name `X'
t.C: In method `X::~X ()':
t.C:15: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Comment 1 Jakub Jelinek 2000-11-13 09:18:50 UTC
Fixed in gcc-c++-2.96-63 in rawhide.


Note You need to log in before you can comment on or make changes to this bug.