[GHC] #12186: Windows linker stack commit setting causing issues (was: GHC compiled executable incompatible with 3rd party software)

GHC ghc-devs at haskell.org
Sat Jun 18 00:23:30 UTC 2016


#12186: Windows linker stack commit setting causing issues
-------------------------------------+-------------------------------------
        Reporter:  tim-m89           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:  x86_64
 Type of failure:  Incorrect result  |  (amd64)
  at runtime                         |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by tim-m89):

 Further investigation reveals that this is directly caused by how the
 linker is invoked with the option:
 {{{
 --stack=0x800000,0x800000
 }}}
 To set the reserve & commit space of the stack respectively, but the issue
 goes away if the stack commit is <= 0x7E000
 {{{
 --stack=0x800000,0x7E000
 }}}
 This change was introduced on #8870 as a 'temporary' fix on 7.8.1 where a
 'proper' fix was apparently supposed to happen on 7.8.2.

 So my next questions would be:
 * Do we need still need the temporary fix? and if so,
  * How much is involved / ETA of the proper solution (easy enough to emit
 [#chkstk __chkstk] calls?)
  * Is 0x800000 commit overkill / would a smaller value work?

 [=#chkstk !__chkstk] [https://support.microsoft.com/en-us/kb/100775]

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


More information about the ghc-tickets mailing list