Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!think!husc6!bu-cs!scott@bu-ma.bu.edu From: scott@bu-ma.bu.edu (Scott Sutherland) Newsgroups: comp.sources.bugs Subject: Re: patch 2.0 patch #11 Message-ID: <880616131328@euler> Date: 16 Jun 88 17:13:28 GMT References: <2169@devvax.JPL.NASA.GOV> <560@gamma.UUCP> <3183@cognos.UUCP> <2781@utastro.UUCP> Lines: 134 In-reply-to: werner@utastro.UUCP's message of 16 Jun 88 11:08:29 GMT In article <2781@utastro.UUCP> werner@utastro.UUCP (Werner Uhrig) writes: > In article <3183@cognos.UUCP>, glee@cognos.uucp (Godfrey Lee) writes: > > In article <560@gamma.UUCP> jeb@gamma.UUCP (John Berry) writes: > > >I seem to have missed patch # 9 for patch 2.0. someone please mail me ... > > > I seem to have missed it too, please also send me a copy. > > the copy of patch-2.0 I had snarfed from somewhere was at patch-level 9 > already and patches 10 and 11 went in smooth enough .... > > check your sources - you may have 9 already, too !!?? > Larry Wall provides a nice automated retrieval system, which he documents how to use in every patch, specifically (from patch #10) If you are missing previous patches they can be obtained from me: Larry Wall lwall@jpl-devvax.jpl.nasa.gov If you send a mail message of the following form it will greatly speed processing: Subject: Command @SH mailpatch PATH patch 2.0 LIST ^ note the c where PATH is a return path FROM ME TO YOU in Internet notation, and LIST is the number of one or more patches you need, separated by spaces, commas, and/or hyphens. Saying 35- says everything from 35 to the end. You can also get the patches via anonymous FTP from jpl-devvax.jpl.nasa.gov (128.149.8.43). Just in case you had trouble with it, here's #9: mailpatch speaking for lwall System: patch version 2.0 Patch #: 9 Priority: LOW Subject: Reversed new-style context diff can cause double free(). From: lwall@sdcrdcf.UUCP Description: A new-style context diff that is reversed (-R) and that contains a hunk with an assumed old or new half is not freed properly. When there is a hunk-half assumed, the lines are duplicated internally by copying the pointers of the actual lines from the other half. A pair of variables then tell the freeing routine not to free that range of fake lines since they will be freed when the other half hunk is freed. The problem is that the routine that swaps halves of the hunk didn't update the variables to point to where the fake lines were moved to. Fix: From rn, say "| patch -d DIR", where DIR is your patch source directory. Outside of rn, say "cd DIR; patch #define PATCHLEVEL 9 Index: pch.c Prereq: 2.0.1.5 *** pch.c.old Thu Jun 4 16:20:28 1987 *** pch.c Thu Jun 4 16:20:43 1987 *************** *** 1,6 **** ! /* $Header: pch.c,v 2.0.1.5 87/01/30 22:47:42 lwall Exp $ * * $Log: pch.c,v $ * Revision 2.0.1.5 87/01/30 22:47:42 lwall * Improved responses to mangled patches. * --- 1,9 ---- ! /* $Header: pch.c,v 2.0.1.6 87/06/04 16:18:13 lwall Exp $ * * $Log: pch.c,v $ + * Revision 2.0.1.6 87/06/04 16:18:13 lwall + * pch_swap didn't swap p_bfake and p_efake. + * * Revision 2.0.1.5 87/01/30 22:47:42 lwall * Improved responses to mangled patches. * *************** *** 900,905 **** --- 903,915 ---- if (tp_char[i] == '\n') { /* account for possible blank line */ blankline = TRUE; i++; + } + if (p_efake >= 0) { /* fix non-freeable ptr range */ + n = p_end - i + 1; + if (p_efake > i) + n = -n; + p_efake += n; + p_bfake += n; } for (n=0; i <= p_end; i++,n++) { p_line[n] = tp_line[i]; Scott Sutherland scott@bu-ma.bu.edu Boston University Math Department