From mint-bounce@lists.fishpool.fi Sun Jan 24 17:08:05 2010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=louE11c7nczpzOA1yFcRC22Co/2SHw+JxvpsmdiIaSk=; b=xfc2PQbq4uBYzh2jVvyW2I7O+MKTML5o17UghXVGJiigDUZqwf45MYkDNjSr/kQiqt cuJWgjVOFTtKFXgMroiKVVOHuWH2BHA2Nd+t1CgfhcAwdgP3DM2h6NuMzdzwCLMSswen EqeRsAVHrPahDkGu3p0NSEU5+O4eFHbne//hI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=mgKTBCjSmQPEluxfGy0hAsp4Y38rZnwJA8MdoZAoX1EmY5SsM1AMct7pCj0WeYqOSt du6jMJmOHvlwoqE4t25oGZm5eZbvcoV8XTNFz2E+A3a1z5th1kKnOWMhrlhckaeKnv1v owphRQ6l7EN7+9vNXLP94dPpaYW80coHRDwoQ= MIME-Version: 1.0 In-Reply-To: <4B5CC2EB.5060603@lutece.net> References: <420195.6969.qm@web27401.mail.ukl.yahoo.com> <201001241235.58825.jflemaire@skynet.be> <4B5CB531.1010806@free.fr> <4B5CC2EB.5060603@lutece.net> Date: Sun, 24 Jan 2010 23:06:10 +0100 Message-ID: Subject: Re: [MiNT] windom and gcc4 From: Miro Kropacek To: OL Cc: mint@lists.fishpool.fi Content-Type: multipart/alternative; boundary=0015175d0a02aabbad047df042c5 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: miro.kropacek@gmail.com Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: --0015175d0a02aabbad047df042c5 Content-Type: text/plain; charset=ISO-8859-1 > I have seen too that Zview crash before quit, this is true now I try to > remember I never find why, it is possible that it is when unload ldg, > personnaly as I not unload ldg with this function for my application I never > see it. I can try to find this bug in some days. > I know where the bug is I just don't know why it happens, it seems like incorrect allocation in the first place, ldg_unload: if( ldg) { if( ldg->close) (*ldg->close)(); Mfree( ((BASPAG *)ldg->baspag)->p_env); Mfree( ldg->baspag); ldg->baspag = NULL; } crash occurs on the last line, ldg->baspage = NULL (!), if I comment this out, everything is OK. It seems that Mfree() frees more than it should (i.e. freeing also the memory where 'ldg' points to) -- MiKRO / Mystic Bytes http://mikro.atari.org --0015175d0a02aabbad047df042c5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable =A0
I have seen too that Zview crash before quit, this is true now= I try to remember I never find why, it is possible that it is when unload = ldg, personnaly as I not unload ldg with this function for my application I= never see it. I can try to find this bug in some days.
I know where the bug is I just don't know why it happens, = it seems like incorrect allocation in the first place, ldg_unload:

i= f( ldg) {
=A0=A0=A0 =A0=A0=A0 if( ldg->close) (*ldg->close)();
= =A0=A0=A0 =A0=A0=A0 Mfree( ((BASPAG *)ldg->baspag)->p_env);
=A0=A0=A0 =A0=A0=A0 Mfree( ldg->baspag);
=A0=A0=A0 =A0=A0=A0 ldg->= baspag =3D NULL;
=A0=A0=A0=A0=A0=A0=A0 }

crash occurs on the last= line, ldg->baspage =3D NULL (!), if I comment this out, everything is O= K. It seems that Mfree() frees more than it should (i.e. freeing also the m= emory where 'ldg' points to)

--
MiKRO / Mystic Bytes
http://mikro.atari.org
--0015175d0a02aabbad047df042c5--