Re: down to one test failure
[email protected] (Richard Clamp) Wed, 14 Aug 2002 03:37:32 +0100
| Newsgroups | perl.perl1.porters |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 13, 2002 at 08:46:31PM +0100, Richard Clamp wrote:
> This leaves me with one failing test on my local boxes - t/comp.decl,
> which currently exits after 5 tests, and throws a big wobbly under
> valgrind[0]. I hope to trap this one later this evening.
I lied, there were two failing tests. op.unshift was also not happy
on Linux/powerpc - valgrind later showed this to be reading outside of
where was malloced, which this I tracked to this in array.c.
if (key > ar->ary_max) {
- int newmax = key + ar->ary_max / 5;
+ int newmax = key + ar->ary_max;
ar->ary_array = (STR**)saferealloc((char*)ar->ary_array,
(newmax+1) * sizeof(STR*));
It feels like the right solution as I can't really see why it was / 5
before, can anyone correct/enlighten me?
I've badly papered over a crack in stab.c, maybe someone wiser can
debug this:
case '~':
- safefree(curoutstab->stab_io->fmt_name);
+ /* FIXME: investigate more carefully. When the following
+ * safefree is allowed to happen the subsequent stabent call
+ * results in a segfault. Commenting it out is a cheap band-aid
+ * and probably a memory leak rolled into one
+ * -- richardc 2002-08-14
+ */
+ /* safefree(curoutstab->stab_io->fmt_name); */
curoutstab->stab_io->fmt_name = str_get(str);
curoutstab->stab_io->fmt_stab = stabent(str_get(str),TRUE);
break;
I can now dubiously claim test passes on Linux and Mac OS X 10.1.5 on
powerpc, Linux and OpenBSD-3.1 on x86.
There are 2 current valgrind errors[0], and a whole bunch of memory
leaks, but I'm calling it progress. Please could folks with other
architectures grab a version from my repository[1] and email me if it
works. Thanks.
[0] http://unixbeard.net/~richardc/lab/grinder/errors.html
[1] http://mirth.unixbeard.net/cgi-bin/viewcvs.cgi/perl1/perl1.tar.gz?tarball=1
--
Richard Clamp <[email protected]>