This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: gcc 2.96, libstdc++ v3 and efence
- To: umbpux at tin dot it
- Subject: Re: gcc 2.96, libstdc++ v3 and efence
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 22 Aug 2000 05:49:46 -0300
- Cc: <gcc-help at gcc dot gnu dot org>, <libstdc++ at sources dot redhat dot com>
- Organization: GCC Team, Red Hat
- References: <20000822083808.TVXC21818.fep02-svc.tin.it@fep19-svc.tin.it>
On Aug 22, 2000, umbpux@tin.it wrote:
>> On Aug 21, 2000, Maurizio Umberto Puxeddu <umbpux@tin.it> wrote:
>>
>> > int *p = new int;
>> > delete [] p;
>>
>> This is wrong. If you allocate with `new', deallocate with `delete',
>> not `delete[]'.
> that was obviously just a typo.
Not that obviously. You were reporting a crash, and messing up malloc
data structures is a common source of crashes :-)
> but the problem is there, have you seen the back trace?
Yep. I think the problem has to do with the fact that some dynamic
initializers of libstdc++ are using new and delete, but you have
defined them so as to depend on cout having already been initialized,
but it depends on some the stuff that's using new and delete. I.e.,
I'm not sure your example is valid C++. It would be nice if we could
run it, though.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me