home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!ogicse!news.u.washington.edu!serval!yoda.eecs.wsu.edu!hlu
- From: hlu@yoda.eecs.wsu.edu (H.J. Lu)
- Newsgroups: comp.os.linux
- Subject: Re: Severe problems with "realloc" (FIX_MALLOC)!
- Keywords: linux realloc bug malloc
- Message-ID: <1992Nov19.082821.13419@serval.net.wsu.edu>
- Date: 19 Nov 92 08:28:21 GMT
- Article-I.D.: serval.1992Nov19.082821.13419
- References: <1992Nov19.004235.9239@arbi.Informatik.Uni-Oldenburg.DE>
- Sender: news@serval.net.wsu.edu (USENET News System)
- Organization: Washington State University
- Lines: 33
-
- In article <1992Nov19.004235.9239@arbi.Informatik.Uni-Oldenburg.DE> Adrian.Wallaschek@arbi.informatik.uni-oldenburg.de (Adrian Wallaschek) writes:
- >
- >Hi fellows!
- >
- >I don't know wether I'm going to warm up forgotten discussions, but hasn't yet
- >anybody worked on a program that makes heavy use of realloc ?
- >
- >I had severe problems getting a regex-package (0.11) to work. I got several
- >IOT-Trap-cores till I remebered about the malloc(0) problem with linux.
- >There is a work-around for malloc and calloc in stdlib.h BUT none for realloc!
- >Somebody forgot something, I suppose! ;-) So to avoid unnecessary cores you
- >might want to include few lines to your stdlib.h (to make it easy, lets
- >patch it!). Its nothing serious (just copied 5 lines) but it makes regex work!
- >
- >I have found that even some library-functions make use of realloc, I think
- >this might be the cause of some porting-problems.
- >
- >If this is a well known problem, please don't flame, I just wanted to help!
- >
-
- [....]
-
- As far as I understand,
-
- realloc (foo, 0);
-
- should free `foo', at least under POSIX. I have put regex 0.11 in the
- testing release of libc 4.2. I haven't heard any bug report about
- that. If it is true, it is a bug in regex 0.11. You should file
- a bug report to the regex maintainer.
-
-
- H.J.
-