[GHC] #14669: 32-bit binaries sometimes throw a stack overflow on shutdown.
GHC
ghc-devs at haskell.org
Tue Jan 23 22:34:30 UTC 2018
#14669: 32-bit binaries sometimes throw a stack overflow on shutdown.
-----------------------------------+----------------------------------
Reporter: sergv | Owner: (none)
Type: bug | Status: infoneeded
Priority: normal | Milestone:
Component: Runtime System | Version: 8.2.1
Resolution: | Keywords:
Operating System: Windows | Architecture: x86
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-----------------------------------+----------------------------------
Comment (by sergv):
I have tried `-fstack-check` but that doesn't help at all. It even breaks
compilation with `-O0`! Just compare the outputs below:
`-O0 -fno-stack-check`:
{{{
.file "StgCRun.c"
.text
Ltext0:
.globl _win32AllocStack
.def _win32AllocStack; .scl 2; .type 32;
.endef
_win32AllocStack:
LFB210:
.file 1 "rts//StgCRun.c"
.loc 1 111 0
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
movl $8224, %eax
call ___chkstk_ms
subl %eax, %esp
.loc 1 113 0
movl $0, %eax
.loc 1 114 0
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
}}}
`-O0 -fstack-check`:
{{{
.file "StgCRun.c"
.text
Ltext0:
.globl _win32AllocStack
.def _win32AllocStack; .scl 2; .type 32;
.endef
_win32AllocStack:
LFB210:
.file 1 "rts//StgCRun.c"
.loc 1 111 0
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
orl $0, -4096(%esp)
orl $0, -8192(%esp)
orl $0, -8224(%esp)
subl $8224, %esp
.loc 1 113 0
movl $0, %eax
.loc 1 114 0
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14669#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list