home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / linux / 21476 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.7 KB  |  41 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!uunet.ca!xenitec!mongrel!shrdlu!gdm
  3. From: gdm@shrdlu.kwnet.on.ca (Giles D Malet)
  4. Subject: SED is buggy (library bug ?)
  5. Organization: 3.141592653589793238462643383279502884197169399
  6. Date: Tue, 22 Dec 1992 19:45:57 GMT
  7. Message-ID: <BzoEwL.6Jr@shrdlu.kwnet.on.ca>
  8. Lines: 31
  9.  
  10. I got the `sed' from the GCC disk about 3 weeks ago, and noticed it made a
  11. mess of a couple of cnews' reports. So, a couple of days ago, I got the
  12. SLS one, to find it is also buggy. In fact, it is the same `sed' :-(
  13.  
  14. Here is the problem :
  15.  
  16. $ echo xxxfooyyy | sed 's/x*\(foo\)y*/\1/'
  17.  
  18. should print just `foo' (ie substring 1 in the left part of the pattern) -
  19. instead it prints the whole lot.
  20.  
  21. My old sed comes from the first release of the shared libraries,
  22. and works fine. It currently uses libc_v2_11c. As a test I linked its
  23. intermediate file ( .a ? can't remember) with the new libraries to form a
  24. static module. This also produced the buggy output, which is what makes
  25. me think something is wrong in the libraries.
  26.  
  27. This is gcc 2.2.2d, jump libc.so.4.2, and its static libs.
  28. OS is v0.99 with tcp patches, but this failed on 0.98P5 as well.
  29.  
  30. Anyone have any ideas ? If someone can tell me where I can find the
  31. source for sed, I will pursue this further myself.
  32.  
  33. BTW - the `newsdaily' reports in cnews are the only things I have noticed
  34. so far that are being upset by this bug, despite a pretty busy system, so
  35. it appears `safe' to use the buggy one. Either I do, or I get `old stat()
  36. call' msgs all over the place...
  37.  
  38. -- 
  39. Giles D Malet                                             gdm@shrdlu.kwnet.on.ca
  40. Waterloo, Ont, Canada       +1 519 725 5726       gdmalet@descartes.uwaterloo.ca
  41.