Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!rocksvax!rocksanne!z From: z@rocksanne.UUCP (Jim Ziobro) Newsgroups: comp.unix.wizards Subject: free memory twice (awk) Message-ID: <232@rocksanne.UUCP> Date: Mon, 15-Dec-86 19:28:40 EST Article-I.D.: rocksann.232 Posted: Mon Dec 15 19:28:40 1986 Date-Received: Wed, 17-Dec-86 05:15:52 EST Organization: Xerox: Webster Research Center, Rochester, NY Lines: 15 Keywords: malloc,awk The 4.3BSD awk program frees memory twice when parsing regular expressions. This is bogus but the standard unix malloc package does not care. Though it never mentions it in the manual malloc(3) will not break if handed a block which was just previously free as long as there was not an intervening malloc. There is a comment in the awk code which hints at something like this but it leaves a lot to be desired: freetr(p1); /* add this when alloc works */ Should you be porting awk watch out for the above line! //Z\\ Jim Ziobro ziobro.henr@xerox.com rocksanne!z