[GHC] #4505: Segmentation fault on long input (list of pairs)
GHC
ghc-devs at haskell.org
Wed Nov 14 12:35:51 UTC 2018
#4505: Segmentation fault on long input (list of pairs)
-------------------------------------+-------------------------------------
Reporter: cathper | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.0.1
Resolution: | Keywords: Segmentation
| fault, segfault, long input
Operating System: Unknown/Multiple | Architecture: x86_64
Type of failure: GHC rejects | (amd64)
valid program | Test Case:
Blocked By: 4258 | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1180
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by michaelpj):
I ran into this recently when attempting to embed some static data into a
program from a Core plugin.
Having found
http://hackage.haskell.org/package/ghc-8.4.3/docs/MkCore.html#v:mkWordExpr
I thought I could sneak a bytestring in as a list of word expressions -
which triggered this issue when the list got long enough. Again, this does
only trigger when compiling without -O, but people do occasionally do
that.
I worked around it by essentially mimicing what `fileEmbed` does to make a
bytestring literal in TH (http://hackage.haskell.org/package/file-
embed-0.0.11/docs/src/Data.FileEmbed.html#bsToExp), but this is somewhat
clumsy as you have to rely on having the `ByteString` names around.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4505#comment:53>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list