Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!clyde!uunet!wuarchive!brutus.cs.uiuc.edu!jarthur!uci-ics!gateway From: schmidt@zola.ics.uci.edu (Doug Schmidt) Newsgroups: gnu.g++.bug Subject: Re: Segmentation violation in destructor if operator delete present Message-ID: <257BFAB0.8009@paris.ics.uci.edu> Date: 5 Dec 89 17:28:15 GMT References: <1021@dutrun.UUCP> Reply-To: schmidt@zola.ics.uci.edu (Doug Schmidt) Organization: University of California, Irvine - Dept of ICS Lines: 33 In-reply-to: ben@duttnph.tudelft.nl (Ben Verwer) In article <1021@dutrun.UUCP>, ben@duttnph (Ben Verwer) writes: >In converting from 1.35 to 1.36 I ran into the following bug >(on both sun3-os4 and sun4-os4): > >ben31> more tmp.c >class t { > int a; >public: > void* operator new (long size) { return new char [size]; } > void operator delete(void* p) {} > t() {} > ~t() {} >}; > >ben32> g++ -v tmp.c >gcc version 1.36.0 (based on GCC 1.36) > /home/duttnph/ph/local/lib/sun4/gcc-cpp -+ -v -undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ tmp.c /usr/tmp/cca08422.cpp >GNU CPP version 1.36 > /home/duttnph/ph/local/lib/sun4/gcc-cc1plus /usr/tmp/cca08422.cpp -quiet -dumpbase tmp.c -version -o /usr/tmp/cca08422.s >GNU C++ version 1.36.0 (based on GCC 1.36) (sparc) compiled by GNU C version 1.36. >default target switches: -mfpu -mepilogue >tmp.c: In method t::~t (): >tmp.c:7: Segmentation violation >g++: Program cc1plus got fatal signal 11. This is fixed in 1.36.2-. Doug -- Any man's death diminishes me, | schmidt@ics.uci.edu (ARPA) Because I am involved in Mankind; | office: (714) 856-4043 And therefore never send to know for whom the bell tolls; It tolls for thee -- John Donne