Date: Wed, 3 Apr 1996 11:34:51 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: cracauer@wavehh.hanse.de Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: phkmalloc and buggy sw... Message-ID: <199604030934.LAA01484@labinfo.iet.unipi.it> In-Reply-To: <9604030928.AA14346@wavehh.hanse.de> from "Martin Cracauer" at Apr 3, 96 11:28:07 am
next in thread | previous in thread | raw e-mail | index | archive | help
> >It happened to me twice now... I have some software which intermixes > >printf() and putchar(), and since the switch to phkmalloc it coredumps > >at times on the putchar() call. > > >Just for the records... I can't tell if there is something terribly > >wrong in my program or it is putchar which must be fixed. I solve the > >problem by replacing putchar('\n') with printf("\n"), and it doesn't > >coredump anymore. > > I'm running a NetBSD-1.1B/i386 with phkmalloc and would really > appreciate it when you could send me a test program that fails on your > machine. Looks like a bug in libc for me, not in phkmalloc. I would be I am afraid I have not saved the buggy program (it was the driver for a PIC programmer, I needed it working and was in a hurry), and I am unable to reproduce the problem now. The coredump was down in __vprintf... or something like this, from memory. Poul also suggests that it is a bug in libc, I tend to agree with this. I'll try to do my best to reproduce the bug, I believe it was related to the use of printf/putchar/puts. > interested to see how the normal malloc could get around without > dumping core. It's probably because the normal malloc locates the memory block descriptors farther away from the data block. Thus, small overflows (say a few bytes beyond the allocated area) are not noticed, as opposed to the case of phkmalloc which probably does more strict consistency checks. Hope this helps Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ ====================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604030934.LAA01484>