Einar Wolfgang Karlsen wrote:
> When trying to retrieve either the current directory or the directory
> contents (running GHC 2.08 on Sun Solaris/Spar Ultra), the following
> happens:
> 
> ewk@hydra% bug
> Segmentation Fault (core dumped)

A few days ago Sigbjorn mailed a patch for this:

*** ghc/lib/required/Directory.lhs.~2~  Wed Aug  6 23:48:54 1997
--- ghc/lib/required/Directory.lhs      Sat Oct 18 21:38:03 1997
***************
*** 383,389 ****
      _ccall_ getCurrentDirectory           `thenIO_Prim` \ str ->
      if str /= ``NULL'' then
          _ccall_ strlen str            `thenIO_Prim` \ len ->
!         stToIO (unpackNBytesST len str)       >>=           \ pwd ->
          _ccall_ free str              `thenIO_Prim` \ () ->
          return pwd
      else
--- 383,389 ----
      _ccall_ getCurrentDirectory           `thenIO_Prim` \ str ->
      if str /= ``NULL'' then
          _ccall_ strlen str            `thenIO_Prim` \ len ->
!         stToIO (unpackNBytesST str len)       >>=           \ pwd ->
          _ccall_ free str              `thenIO_Prim` \ () ->
          return pwd
      else

[ As usual: Tab <-> Blank confusion.  When does Glasgow switch to MIME? 
:-( ]

-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne

Reply via email to