[comp.sources.bugs] perl patch 18 the diff of correct and managled version

worsley@ditmela.oz (Andrew Worsley) (02/18/88)

   I got the mangled version of patch 18 to perl so I edited out the stuff after
the patch to search.h applied this and the following patches which appeared
to make everything happy and eventually got the uuencoded version of patch18
and just applied the search.h patch. That was the only mangled part of patch18
that was managled.  Now everything compiles, only perl dumps core in the middle
of TEST. It complains about a Corrupt malloc pointer. Can anyone respond
if they get perl dumping core on the same test?
   
   It appears that the patches to TEST cause this since the perl prior to
patch16+ passed the tests and now it core dumps as well as the new one. At the
moment I havn't the time to find this bug so I will just stick with the old
version of perl, which although it doesn't pass TEST now it once did.

  Anyway here is the diff between the mangled and unmanagled versions of
of patch18 with 'x' at the start of every line strip these out.
x*** patch.18	Mon Feb  8 10:58:26 1988
x--- patch18	Thu Feb 18 13:36:46 1988
x***************
x*** 1,13 ****
x- Path: ditmela!mulga!munnari!uunet!lll-winken!lll-lcc!ames!elroy!devvax!lroot
x- From: lroot@devvax.JPL.NASA.GOV (The Superuser)
x- Newsgroups: comp.sources.bugs
x- Subject: perl 1.0 patch #18
x- Summary: This is an official patch for perl 1.0.  Please apply it.
x- Message-ID: <1227@devvax.JPL.NASA.GOV>
x- Date: 4 Feb 88 19:54:56 GMT
x- Organization: Jet Propulsion Laboratory, Pasadena, CA
x- Lines: 644
x- 
x  System: perl version 1.0
x  Patch #: 18
x  Priority: LOW if you have void, MEDIUM if not
x--- 1,3 ----
x***************
x*** 481,487 ****
x  ! /* $Header: search.h,v 1.0 87/12/18 13:06:06 root Exp $
x     *
x     * $Log:	search.h,v $
x!    * Revision 1.0   10,16 ****
x    #define	MAXSUB	10		/* how many sub-patterns are allowed */
x    #define MAXALT	10		/* how many alternatives are allowed */
x     
x--- 471,492 ----
x  ! /* $Header: search.h,v 1.0 87/12/18 13:06:06 root Exp $
x     *
x     * $Log:	search.h,v $
x!    * Revision 1.0  87/12/18  13:06:06  root
x!    * Initial revision
x!    * 
x! --- 1,10 ----
x! ! /* $Header: search.h,v 1.0.1.1 88/02/04 11:20:02 root Exp $
x!    *
x!    * $Log:	search.h,v $
x! +  * Revision 1.0.1.1  88/02/04  11:20:02  root
x! +  * patch18: regularized includes.  Changed typedef COMPEX to struct compex
x! +  * 	so that typedef COMPEX could be done as a forward declaration.
x! +  * 
x!    * Revision 1.0  87/12/18  13:06:06  root
x!    * Initial revision
x!    * 
x! ***************
x! *** 10,16 ****
x    #define	MAXSUB	10		/* how many sub-patterns are allowed */
x    #define MAXALT	10		/* how many alternatives are allowed */
x     

krohn@u1100a.UUCP (Eric Krohn) (02/23/88)

In article <294@ditmela.oz> worsley@ditmela.oz (Andrew Worsley) writes:
] 
] ........            Now everything compiles, only perl dumps core in the
] middle of TEST. It complains about a Corrupt malloc pointer. Can anyone 
] respond if they get perl dumping core on the same test?

I too noticed this problem and spent last Saturday tracking it down.
The problem is in the new size given to the second GROWSTR in str_gets.
The previous weekend I tracked down the problem with the test script
t/op.unshift.  This was caused by aunshift not keeping the old array size 
before calling astore and having it resize the array.  Both bugs cause malloc 
arena overwrite problems.  I mailed fixes to Larry Wall, so hopefully we will
see official patches for them soon.
(Larry, you did get the mail, didn't you?  E-mail being what it is :-)

-- 
--
Eric J. Krohn
krohn@ctt.ctt.bellcore.com  or  {allegra,bellcore,ihnp4}!u1100a!krohn
Bell Communications Research,	444 Hoes Ln,    Piscataway, NJ 08854