[GHC] #8316: GHCi debugger segfaults when trying force a certain variable

GHC ghc-devs at haskell.org
Sun May 20 14:38:03 UTC 2018


#8316: GHCi debugger segfaults when trying force a certain variable
-------------------------------------+-------------------------------------
        Reporter:  guest             |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:
       Component:  GHCi              |              Version:  7.6.3
      Resolution:                    |             Keywords:  debugger
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4535
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Old description:

> The file Test.hs has following definition:
> {{{
> foo :: [Int]
> foo = [1..]
> }}}
>
> Calling ghci as:
> {{{
> ghci Test.hs -ignore-dot-ghci
> }}}
>
> and bebugging foo like this:
> {{{
> *Main> :break foo
> Breakpoint 0 activated at main.hs:2:7-11
> *Main> foo
> Stopped in Main.foo, main.hs:2:7-11
> _result :: [Int] = _
> [main.hs:2:7-11] [main.hs:2:7-11] *Main> :print foo
> foo = (_t1::[Int])
> [main.hs:2:7-11] [main.hs:2:7-11] *Main> _t1
> }}}
>
> results in this segault:
> {{{
> <interactive>: internal error: TSO object entered!
>     (GHC version 8.5.20180302 for x86_64_unknown_linux)
>     Please report this as a GHC bug:
> http://www.haskell.org/ghc/reportabug
> [1]    5445 abort (core dumped)  ghci Test.hs -ignore-dot-ghci
> }}}

New description:

 The file Test.hs has following definition:
 {{{
 foo :: [Int]
 foo = [1..]
 }}}

 Calling ghci as:
 {{{
 ghci Test.hs -ignore-dot-ghci
 }}}

 and bebugging foo like this:
 {{{
 *Main> :break foo
 Breakpoint 0 activated at main.hs:2:7-11
 *Main> foo
 Stopped in Main.foo, main.hs:2:7-11
 _result :: [Int] = _
 [main.hs:2:7-11] *Main> :print foo
 foo = (_t1::[Int])
 [main.hs:2:7-11] *Main> _t1
 }}}

 results in this segault:
 {{{
 <interactive>: internal error: TSO object entered!
     (GHC version 8.5.20180302 for x86_64_unknown_linux)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 [1]    5445 abort (core dumped)  ghci Test.hs -ignore-dot-ghci
 }}}

--

Comment (by Nolan):

 Bug with context printed twice was fixed.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8316#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list