[GHC] #8281: The impossible happened: primRepToFFIType
GHC
ghc-devs at haskell.org
Fri May 12 03:05:33 UTC 2017
#8281: The impossible happened: primRepToFFIType
-------------------------------------+-------------------------------------
Reporter: tibbe | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.4.1
Component: Compiler | Version: 7.6.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by winter):
Replying to [comment:15 simonmar]:
> @winter it's always wrong to pass an unpinned `ByteArray#` to a foreign
call, regardless of whether the call is annotated as `safe` or `unsafe`,
because GHC is free to implement an `unsafe` call as a `safe` call.
Indeed we do this in GHCi.
But lots of packages(text, for example) seems to be relying on this
assumption, as you pointed out, text implemented its copy with FFI memcpy
rather than a `copyByteArray#`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8281#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list