Alex Ferguson writes:
>
> swift.ucc.ie:~/filter: cat cwd.hs
>
> import Directory
>
> main = getCurrentDirectory >> return ()
> swift.ucc.ie:~/filter: ghc-2.05 cwd.hs
> Module version unchanged at 1
> swift.ucc.ie:~/filter: a.out
> swift.ucc.ie:~/filter: ghc-2.07 cwd.hs
> Module version unchanged at 1
> swift.ucc.ie:~/filter: a.out
> Segmentation fault caught, address = 00000000
> Abort
Thanks, a bug - patch appended.
--Sigbjorn
*** 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