Opened 13 years ago

Closed 13 years ago

Last modified 44 years ago

#573 closed bug (Fixed)

ghci crash (illegal operation)

Reported by: xoltar Owned by: nobody
Priority: normal Milestone:
Component: Compiler Version: 5.0
Keywords: Cc:
Operating System: Architecture:
Type of failure: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I'm on NT 4 sp3 with ghc-5.01 thrill-seeker's release.
Under ghc --interactive, I get an illegal operation
when I run the following session. I'll attach the file
scratch.hs which contains the offending code. Feel free
to comment on the code itself, if you have the time. :-)

Administrator@BRK /NextGen/src/magellan/src/haskell
$ ghc --interactive
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version
5.01, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package std ... linking ... done.
Prelude> :load scratch
Compiling Main             ( scratch.hs, interpreted )
Ok, modules loaded: Main.
Main> foo <- findFirstAvailName "foo"

Administrator@BRK /NextGen/src/magellan/src/haskell
$

Attachments (1)

scratch.2.hs (2.0 KB) - added by xoltar 13 years ago.

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by xoltar

comment:1 Changed 13 years ago by sewardj

Logged In: YES 
user_id=50143

Bryn

I can't repro this and I'm not convinced there's a
problem.  Please can you send more information, saying
*exactly* the sequence of steps to recreate the error
and *exactly* in what way you think GHCi has behaved
incorrectly.

You mention the phrase "illegal operation", but none of
the error messages I get contain that phrase.  So I don't
know if you meant exactly that, or whether GHCi crashed
in some other way.  Please clarify.

On both the Win32 and Linux builds, findFirstAvailName "foo"
causes getDirectoryContents to throw an exception.  That's 
because the definition of dirFile causes the arg of
getDirectoryContents, viz, fst (dirFile "foo") to be the
empty string.  

J

comment:2 Changed 13 years ago by rrt

  • Status changed from assigned to closed
Logged In: YES 
user_id=50145

I *was* able to reproduce this exactly as above using ghc
5.01 "Borag Thungg"; Julian failed to repro using HEAD.
Hence it seems to be a bug that's been fixed, and I'm
closing it.
Note: See TracTickets for help on using tickets.