#3618: memory-leak detector in +RTS -DS fails to track allocations in
constructors
-------------------------------+--------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone: _|_
Component: Runtime System | Version: 6.12.1 RC1
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Linux
Architecture: x86_64 (amd64) |
-------------------------------+--------------------------------------------
Comment (by simonmar):
Replying to [comment:3 augustss]:
> I find it highly dubious to leave this unfixed. The ghc rts is called
before it has been initialized, so I'd say that if it works it's more of a
fluke than by design.
I'm sure it's safe: we're only calling the RTS in one way, `getStablePtr`,
and we're careful to ensure that can be called before the RTS is
initialised. It is also thread-safe.
I just looked back through the commit logs and it seems that we switched
to using constructors for registering foreign exports for binary size
reasons (to eliminate the __stginit functions in the common case), but
then we reinstated __stginit later. So perhaps the constructors aren't
really helping. However, if we're going to redesign things here, I think
we should look for a way to eliminate the need to call `hs_add_root` when
initialising the RTS, which is both non-standard and annoying.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3618#comment:4>
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