[GHC] #14521: Infinite loop at runtime when a given function is not marked INLINE
GHC
ghc-devs at haskell.org
Fri Nov 24 07:53:59 UTC 2017
#14521: Infinite loop at runtime when a given function is not marked INLINE
-------------------------------------+-------------------------------------
Reporter: OlivierSohn | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.2
Keywords: | Operating System: MacOS X
Architecture: | Type of failure: Incorrect result
Unknown/Multiple | at runtime
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Hello,
in https://github.com/OlivierSohn/hamazed/issues/1 I describe the
following issue:
When compiling on OSX with optimizations (`stack clean && stack build`
with resolver `lts-9.12` (ghc 8.0.2)), the program loops infinitely (400%
CPU, and execution is blocked) when an animation is triggered, if the
function `Animation.animate'` is not inlined.
The bug is visible at this commit :
https://github.com/OlivierSohn/hamazed/commit/9f25223ef0502f91cd9633654bdb172f714c3920
(to reproduce, shoot at a number in the game)
The fix is the commit that follows :
https://github.com/OlivierSohn/hamazed/commit/597619bb14974d2bbacfb284a9e276a7cf2d2f52
stack version: `1.3.2, Git revision
3f675146590da4f3edf768b89355f798229da2a5 (4395 commits) x86_64
hpack-0.15.0`
Could this be a compiler bug?
The code is available at https://github.com/OlivierSohn/hamazed
I could try to create another program that reproduces the issue more
easily (without having to play the game), just let me know if you need it.
Thank you,
Olivier
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14521>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list