Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!apollo!vinoski From: vinoski@apollo.HP.COM (Stephen Vinoski) Newsgroups: comp.lang.perl Subject: Re: Possible bug in MS-DOS Perl pl41? Keywords: msdos perl bug Message-ID: <4f626458.20b6d@apollo.HP.COM> Date: 23 Jan 91 22:15:00 GMT References: <119440@uunet.UU.NET> <1991Jan22.054732.14797@convex.com> <119542@uunet.UU.NET> <6504@gssc.UUCP> Sender: root@apollo.HP.COM Reply-To: vinoski@apollo.HP.COM (Stephen Vinoski) Organization: Hewlett-Packard Company, Apollo Division; Chelmsford, MA Lines: 33 In article <6504@gssc.UUCP> timr@gssc.UUCP (Tim Roberts) writes: >I am encountering what I believe to be a bug in the MS-DOS port of Perl at >patch level 41, with header "perly.c,v 3.0.1.9 90/11/10 01:53:26". Before I >really dig in to investigate, however, I want to check to see if anyone else >has encountered this problem. > >Occasionally while reading data files, my scripts see repeated or missing >characters. It happens during the read; if I put a "print" immediately after >the "while () {", I see the bad data. Patchlevel 41 had a bug in str.c which was fixed in pl44. Until you get to pl44, apply the enclosed patch to fix the trouble you're having. *** str.c.old Fri Nov 16 20:23:48 1990 --- str.c Sat Nov 17 12:32:11 1990 *************** *** 804,809 **** --- 804,810 ---- if (get_paragraph && oldbp) obpx = oldbp - str->str_ptr; bpx = bp - str->str_ptr; /* prepare for possible relocation */ + str->str_cur = bpx; STR_GROW(str, str->str_len + append + cnt + 2); bp = str->str_ptr + bpx; /* reconstitute our pointer */ if (get_paragraph && oldbp) -steve | Steve Vinoski (508)256-6600 x5904 | Internet: vinoski@apollo.hp.com | | Testability and Diagnostics | UUCP: ...mit-eddie!apollo!vinoski| | HP Apollo Division, Chelmsford, MA 01824 | ...uw-beaver!apollo!vinoski|