Opened 2 years ago

Closed 2 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:

Description

watashi % ghci -ignore-dot-ghci
GHCi, version 7.10.1: http://www.haskell.org/ghc/  :? 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:  http://www.haskell.org/ghc/reportabug

Change History (3)

comment:1 Changed 2 years ago by thoughtpolice

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

comment:2 Changed 2 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: https://phabricator.haskell.org/D967

GHC Trac Issues: #10501

comment:3 Changed 2 years ago by thoughtpolice

Resolution: fixed
Status: patchclosed

Merged to ghc-7.10.

Note: See TracTickets for help on using tickets.