[GHC] #7762: when using lots of memory: internal error: evacuate(static): strange closure type 4
GHC
ghc-devs at haskell.org
Fri Oct 25 11:19:07 UTC 2013
#7762: when using lots of memory: internal error: evacuate(static): strange
closure type 4
-----------------------------------+----------------------------------
Reporter: rthiemann | Owner: simonmar
Type: bug | Status: new
Priority: highest | Milestone: 7.8.1
Component: Runtime System | Version: 7.0.4
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64 (amd64)
Type of failure: Runtime crash | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-----------------------------------+----------------------------------
Comment (by Simon Marlow <marlowsd@…>):
In [changeset:"36b042fbf60210ab6859d96e5b4b5e121085816d/ghc"]:
{{{
#!CommitTicketReference repository="ghc"
revision="36b042fbf60210ab6859d96e5b4b5e121085816d"
Make integer overflow less likely to happen (#7762)
The particular problematic code in #7762 was this:
nat newSize = size - n;
char *freeAddr = MBLOCK_ROUND_DOWN(bd->start);
freeAddr += newSize * MBLOCK_SIZE;
^^^^^^^^^^^^^^^^^^^^^^ OVERFLOW!!!
For good measure, I'm going to fix the bug twice. This patch fixes
the class of bugs of this kind, by making sure that any expressions
involving BLOCK_SIZE or MBLOCK_SIZE are promoted to unsigned long. In
a separate patch, I'll fix a bunch of individual instances (including
the one above).
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7762#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list