#3618: memory-leak detector in +RTS -DS fails to track allocations in 
constructors
-------------------------------+--------------------------------------------
    Reporter:  guest           |         Type:  bug           
      Status:  closed          |     Priority:  normal        
   Milestone:  _|_             |    Component:  Runtime System
     Version:  6.12.1 RC1      |   Resolution:  fixed         
    Keywords:                  |     Testcase:                
   Blockedby:                  |   Difficulty:  Unknown       
          Os:  Linux           |     Blocking:                
Architecture:  x86_64 (amd64)  |      Failure:  None/Unknown  
-------------------------------+--------------------------------------------
Changes (by Lemming):

 * cc: g...@… (added)


Comment:

 I'd be interested whether the poster of this ticket could solve his
 problem.
 I use Linux on x86_32.
 I also have a bigger project using LLVM, that crashed.
 It crashed with GHC-6.10.4 with static linking
 and with GHC-6.12.3 with static and dynamic linking.
 I am not able to make the crashing program small enough,
 since at some point it does not crash anymore when I reduce its size.
 Following http://hackage.haskell.org/trac/ghc/wiki/Debugging/CompiledCode,
 I used "+RTS -DS" runtime options
 as well as no "-threaded" (it always let me jump into handle_tick)
 and "-debug -dcore-lint" compiler options.
 In GDB I found that the final crash happens in deRefStablePtr
 while accessing an address like 0xaaaaaaaa.
 (I actually use StablePtrs in my code.)
 The GHC-Wiki page says,
 that this is the value a deallocated piece of memory is filled with.
 I also got the messages:
 {{{
 Warning: Freeing non-allocated memory at 0x95b2438
 Warning: Freeing non-allocated memory at 0x95b1410
 Warning: Freeing non-allocated memory at 0x95b1008
 Warning: Freeing non-allocated memory at 0x95b3440
 Warning: Freeing non-allocated memory at 0x95b4440
 Warning: 36 bytes at 0x95bca10 still allocated at shutdown
 Warning: 128 bytes at 0x95bc978 still allocated at shutdown
 ...
 }}}
 and thought that is better to fix them first,
 before continuing with my deRefStablePtr crash,
 because the two problems might be related.
 However I have seen that the "freeing non-allocated memory" warnings occur
 in even the simplest programs.
 Now I read here that the warnings are probably pointless.
 I'm still uncertain.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to