hledger icon indicating copy to clipboard operation
hledger copied to clipboard

can't get recursiveSize of a Journal in GHCI

Open simonmichael opened this issue 9 years ago • 2 comments

With latest hledger-lib and ghc-datasize, recursiveSize gives a segfault:

$ stack ghci hledger-lib --package ghc-datasize 
> import GHC.DataSize
> j <- readJournalFile Nothing Nothing False "data/sample.journal"
> closureSize j
40
> recursiveSize j
Segmentation fault: 11

With hledger-lib-0.27, recursiveSize seems to hang instead. Possibly related to knot-tying like #348.

simonmichael avatar May 23 '16 18:05 simonmichael

In fact, I'm seeing a segfault with this trivial data type:

$ ghci
> import GHC.DataSize
> data A = A Int deriving Show
> closureSize $ A 1
16
> recursiveSize $ A 1
Segmentation fault: 11

simonmichael avatar May 23 '16 18:05 simonmichael

Since ghc-datasize is pretty simple, my first guess is that it's https://github.com/nomeata/ghc-heap-view/issues/3

def- avatar May 23 '16 18:05 def-