home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 945 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.3 KB  |  44 lines

  1. Newsgroups: comp.lang.rexx
  2. Path: sparky!uunet!noc.near.net!ns.draper.com!news.draper.com!MVS.draper.com!SEB1525
  3. From: SEB1525@MVS.draper.com (Steve Bacher)
  4. Subject: regina bug with very long strings
  5. Message-ID: <19920908170207SEB1525@MVS.draper.com>
  6. Sender: MVS NNTP News Reader <NNMVS@MVS.draper.com>
  7. Nntp-Posting-Host: mvs.draper.com
  8. Organization: Draper Laboratory
  9. Date: Tue, 8 Sep 1992 22:02:00 GMT
  10. Lines: 32
  11.  
  12. There appears to be a bug in Regina 0.03d with long strings.
  13. If I do something like
  14.  
  15.  foo = copies("x",100000)
  16.  
  17. and then do
  18.  
  19.  say length(foo)
  20.  
  21. I get a segmentation fault.  Where exactly the fault occurs depends on
  22. if I run the SunOS version or the AIX version.
  23.  
  24. Similarly, if I do
  25.  
  26. foo = 'cat'('/etc/hosts')
  27.  
  28. (which produces a very long string for most people)
  29.  
  30. on SunOS, length(foo) returns a negative number; on AIX, the operation
  31. gets a segmentation fault.
  32.  
  33. This is triggered by any attempt to create a string longer than
  34. 32767 bytes.
  35.  
  36. Shouldn't Regina recover more gracefully from attempts to create a
  37. string longer than the maximum value it can handle?  Is this maximum
  38. value documented, anyhow?  It would be less painful if the length of a
  39. string were held as an int rather than a short (see src/strings.h).
  40.  
  41. --
  42. Steve Bacher (Batchman)                 Draper Laboratory
  43. Internet: seb@draper.com                Cambridge, MA, USA
  44.