Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation fault #4

Open
mantkiew opened this issue Oct 9, 2014 · 3 comments
Open

segmentation fault #4

mantkiew opened this issue Oct 9, 2014 · 3 comments

Comments

@mantkiew
Copy link

mantkiew commented Oct 9, 2014

GHC 7.8.3 32bit, Windows

Consider the following example:

data Pair2 = Pair2 !Int !Int
let p2 = Pair2 (1+2) (3+4)
:vis
:view p2

the window is empty and nothing works. When I close the window and do

:vis
:view p2

I get

Prelude> Segmentation fault. That's a minimal example I constructed; however, this exact same bug happened to me many times when trying to work with ghc-vis on a small program.

@def-
Copy link
Owner

def- commented Oct 10, 2014

Looks like this issue in ghc-heap-view: nomeata/ghc-heap-view#3

@def-
Copy link
Owner

def- commented Dec 4, 2019

To quote from the ghc-heap-view issue:

PR 23 deleted the code of ghc-heap-view to read the heap. instead ghc-heap-view now uses the standard GHC library GHC.Exts.Heap. Since this change, I could NOT reproduce any of the Unknown opcode 0exceptions. So I think, PR 23 also fixed this issue.

However, the issue is only fixed in GHC with version >= 8.6. Nothing was done for older versions.

@tippenein
Copy link

stack ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.8.1
$ stack repl
λ> :script ghci
λ> :vis
λ> let g = [1..]
λ> :view g

This also leads to a segfault on my Linux machine.

I'll look a bit into this and see if there are more details which could be useful, but it seems the ghc version isn't the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants