OpenAmiga (919/959)

From:Jesse McClusky
Date:1 Sep 2000 at 01:46:04
Subject:Re: AMIOPEN: vpcc as a C++ compiler

> From: "Gregory Roberts II" <gregr@en.com>
>
> On Thu, 31 Aug 2000, Henrik Munther wrote:
>
<snip>
> > eg. the following example will crash:
> >
> > class Foo
> > {public:
> > Foo() {}
> > ~Foo() {}
> > };
> >
> > int main(int argc, char **argv)
> > { Foo t;
> > }

I can actually explain why (I think) this is happening.
It's probably because the "Foo t;" causes it to be
allocated from the stack, but when it falls out-of-scope
and _delete is called, /sys/kn/mem/free () is trying to
free a memory-alloc entry that doesn't exist (part of
the stack). This is a bug in the code-generation portion
of the compiler.

Jesse

Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html