Opened 4 years ago

Closed 4 years ago

#10501 closed bug (fixed)

Exception in :cmd command can terminate GHCi

Reported by: watashi Owned by: watashi
Priority: normal Milestone: 7.10.2
Component: GHCi Version: 7.10.1
Keywords: Cc: hvr
Operating System: Linux Architecture: x86
Type of failure: GHCi crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D967
Wiki Page:


watashi % ghci -ignore-dot-ghci
GHCi, version 7.10.1:  :? for help
Prelude> :cmd return $ head []
ghc: panic! (the 'impossible' happened)
  (GHC version 7.10.1 for i386-unknown-linux):
	Prelude.head: empty list

Please report this as a GHC bug:

Change History (3)

comment:1 Changed 4 years ago by thoughtpolice

Differential Rev(s): Phab:D967
Status: newpatch

comment:2 Changed 4 years ago by Austin Seipp <austin@…>

In 3b55659d4f54e503f4e550d762bc55a2650ed13d/ghc:

Always force the exception in enqueued commands

`enqueueCommands` should always force exception in commands. Otherwise
the exception thrown in `:cmd` (e.g. `:cmd return $ head []`) will cause
GHCi to terminate with panic.

Test Plan: `cd testsuite/tests/ghci/ && make`

Reviewed By: austin

Differential Revision:

GHC Trac Issues: #10501

comment:3 Changed 4 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged to ghc-7.10.

Note: See TracTickets for help on using tickets.