[GHC] #11792: Optimised unsafe FFI call can get wrong argument

GHC ghc-devs at haskell.org
Thu May 26 10:03:06 UTC 2016


#11792: Optimised unsafe FFI call can get wrong argument
-------------------------------------+-------------------------------------
        Reporter:  Szunti            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            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:                    |  Differential Rev(s):  Phab:D2263
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by osa1):

 I was doing some reading on Cmm and found something that may be relevant
 in [this wiki
 page](https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/CmmType):

 > Global Registers in Cmm currently have a problem with inlining: because
 neither compiler/cmm/PprC.hs nor the NCG are able to keep Global Registers
 from clashing with C argument passing registers, Cmm expressions that
 contain Global Registers cannot be inlined into an argument position of a
 foreign call. For more thorough notes on inlining, see the comments in
 compiler/cmm/CmmOpt.hs.

 The page is a bit out of date but this part sounded like the problem we're
 having here.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11792#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list