[GHC] #9172: integer overflow in allocate()

#9172: integer overflow in allocate() ------------------------------------+------------------------------------- Reporter: rwbarton | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 7.8.1 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- {{{ Prelude> Data.Array.array (0,2^61 * 1024 `div` 1025) [] array (0,<interactive>: internal error: evacuate: strange closure type 2131681697 (GHC version 7.8.1 for x86_64_unknown_linux) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug Aborted }}} You can get a variety of other errors too. The array size is chosen so that the total size (in words) passed to `allocate` is just a bit over 2^61^. The computation of `req_blocks` overflows: {{{ W_ req_blocks = (W_)BLOCK_ROUND_UP(n*sizeof(W_)) / BLOCK_SIZE; }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9172 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9172: integer overflow in allocate()
-------------------------------------+------------------------------------
Reporter: rwbarton | Owner: rwbarton
Type: bug | Status: new
Priority: normal | Milestone:
Component: Runtime System | Version: 7.8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by Reid Barton

#9172: integer overflow in allocate() -------------------------------------+------------------------------------ Reporter: rwbarton | Owner: rwbarton Type: bug | Status: merge Priority: normal | Milestone: 7.8.4 Component: Runtime System | Version: 7.8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by rwbarton): * status: new => merge * milestone: => 7.8.4 Comment: No rush on merging this because there are a fair number of similar issues that I intend to also fix at some point. In fact I would be totally fine with leaving it out of 7.8 completely. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9172#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9172: integer overflow in allocate() -------------------------------------+------------------------------------ Reporter: rwbarton | Owner: rwbarton Type: bug | Status: closed Priority: normal | Milestone: 7.8.3 Component: Runtime System | Version: 7.8.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed * milestone: 7.8.4 => 7.8.3 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9172#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC