home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 16907 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.6 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!doc.ic.ac.uk!uknet!mcsun!news.funet.fi!ousrvr.oulu.fi!funic!nntp.hut.fi!nntp!jem
  2. From: jem@snakemail.hut.fi (Johan Myreen)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: ANNOUNCE: Linux 0.98 pl5
  5. Message-ID: <JEM.92Nov16213559@lk-hp-6.hut.fi>
  6. Date: 16 Nov 92 19:35:59 GMT
  7. References: <1992Nov15.220138.5434@klaava.Helsinki.FI>
  8. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  9. Organization: Helsinki University of Technology, Finland
  10. Lines: 24
  11. In-Reply-To: torvalds@klaava.Helsinki.FI's message of 15 Nov 92 22:01:38 GMT
  12. Nntp-Posting-Host: lk-hp-6.hut.fi
  13.  
  14. In article <1992Nov15.220138.5434@klaava.Helsinki.FI> torvalds@klaava.Helsinki.FI (Linus Torvalds) writes:
  15.  
  16. >NOTE! READ THIS AND PONDER:
  17.  
  18. >pl5 now checks against writing to the text segment.  Older binaries
  19. >which used the original estdio library (used with the earliest gcc
  20. >versions) are liable to break: not that there should be many of these
  21. >binaries around.  So if you get "Segmentation fault (core dumped)" on
  22. >binaries you know used to work, this is the likely cause. 
  23.  
  24. Before the "bug reports" start coming in, I'd like to point out one
  25. consequence of write-protected text segments. Gcc puts strings in the
  26. text segment, and is entitled to do so, since the C standard says
  27. string literals are const.
  28.  
  29. This breaks code modifying string literals, like for instance the
  30. mktemp library function when called like this: mktemp("/tmp/fooXXXXXX"). 
  31.  
  32. This is not a bug in Linux or Gcc, but in *your* application, if you
  33. use mktemp like this, or do tricks like "bar"[2]++...
  34.  
  35. --
  36. Johan Myreen
  37. jem@cs.hut.fi
  38.