Message from discussion
Trying to port mksh to Coherent
Received: by 10.68.125.201 with SMTP id ms9mr1420825pbb.3.1336233565770;
Sat, 05 May 2012 08:59:25 -0700 (PDT)
Path: pr3ni7336pbb.0!nntp.google.com!news2.google.com!goblin2!goblin1!goblin.stu.neva.ru!newsfeed.pionier.net.pl!news.man.poznan.pl!not-for-mail
From: Andrzej Popielewicz <va...@icpnet.pl>
Newsgroups: comp.os.coherent
Subject: Re: Trying to port mksh to Coherent
Date: Sat, 05 May 2012 17:59:23 +0200
Organization: POZMAN - http://www.man.poznan.pl/
Lines: 24
Message-ID: <jo3ios$ob2$1@sunflower.man.poznan.pl>
References: <676e3fc3-19d5-4562-a827-6a7a552e9b1a@ot8g2000pbb.googlegroups.com> <fbfe2771-3c50-416b-98b0-ca2a69889b03@w9g2000pbm.googlegroups.com> <jndceo$p0s$1@sunflower.man.poznan.pl> <517587ef-8aa2-45d1-b061-9b2318387eb7@iu9g2000pbc.googlegroups.com> <jnjsti$rfm$1@sunflower.man.poznan.pl> <jnjv67$c2q$1@sunflower.man.poznan.pl> <Pine.BSM.4.64L.1205041937170.19620@herc.mirbsd.org>
NNTP-Posting-Host: d151-144.icpnet.pl
Mime-Version: 1.0
X-Trace: sunflower.man.poznan.pl 1336233564 24930 109.173.151.144 (5 May 2012 15:59:24 GMT)
X-Complaints-To: tomjab@man.poznan.pl
NNTP-Posting-Date: Sat, 5 May 2012 15:59:24 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.24 (X11/20100623)
In-Reply-To: <Pine.BSM.4.64L.1205041937170.19620@herc.mirbsd.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Thorsten Glaser pisze:
> If you add -DDEBUG to the compilation of lalloc.c (just that
> one file) you would get more information and a core dump by
> means of calling abort() on that place.
I followed Your advice and used DEBUG in lalloc.
The message produced now is not more informative, it tells "rogue
pointer 8c8 at ap 0". After adding some fprintfs I have found , that
error occurs in findptr, called in itself by afree.
It means ap itself in findptr is not NULL but ap->next is.
afree fails for the same reason : ap->next is NULL.
BTW , the error occurs after many remalloc calls in subsequent aresize
calls are succesful.
I feel it will be a rather difficult task to find out why the code
created with newer compiler has problems with memory allocation/freeing.
Perhaps it depends on headers.
Anyway thanks for comments.
Andrzej