[GHC] #15038: Memory Corruption (strange closure type)
GHC
ghc-devs at haskell.org
Mon Apr 16 12:33:12 UTC 2018
#15038: Memory Corruption (strange closure type)
-------------------------------------+-------------------------------------
Reporter: andrewthad | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by osa1):
I managed to reproduce this without stack or cabal. Steps:
- Install dependencies: `cabal install containers split ghc-prim
primitive`
- Build the executable: `ghc-stage2 common/Data/Trie/Naive.hs
src/Packed/Bytes.hs src/Packed/Bytes/Parser.hs src/Packed/Bytes/Small.hs
src/Packed/Bytes/Stream/ST.hs src/Packed/Bytes/Window.hs test/Main.hs
test/Parser.hs -fforce-recomp -o main`
- Run `./main`
It works fine with `-O0`, fails with `-O1` and `-O2`, but with different
"strange closure" types. `-O1` prints 16661, `-O2` prints 16665. Even more
interestingly I get a different number if I also add `-debug`: 16621.
The object with "strange closure type" is a static one, and does not
reside in heap. On my system it's at 0x967900.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15038#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list