[GHC] #11312: GHC inlining primitive string literals can affect program output
GHC
ghc-devs at haskell.org
Thu Jan 7 16:21:48 UTC 2016
#11312: GHC inlining primitive string literals can affect program output
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: #11292 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by ekmett):
From a CLC perspective, I'd consider anything involving unboxed string
literals to fall under the purview of the GHC developers.
It is a very compiler-specific detail that doesn't leak into much user
visible code, so whatever you think is cleanest should be good enough for
us.
As for the lack of an operation for `String# -> Addr#` that gets a bit
messier.
We already have
{{{#!hs
byteArrayContents# :: ByteArray# -> Addr#
}}}
replete with the caveat that it should only be used with pinned byte
arrays and with the suggestion that `String# = ByteArray#` these are
effectively pre-pinned byte array literals.
The existence of that primitive wasn't an issue until now, but becomes one
in the presence of unboxed string literals.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11312#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list