#5177: Segfault in reportCCSProfiling
-------------------------------+--------------------------------------------
Reporter: dankna | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.2.1
Component: Profiling | Version: 7.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: MacOS X | Blocking:
Architecture: x86_64 (amd64) | Failure: Runtime crash
-------------------------------+--------------------------------------------
Changes (by dankna):
* status: infoneeded => new
Comment:
Okay, so I did this. The stack trace wasn't any more useful (everything
outside the reportCCSProfiling frame was my Objective-C main program or
Apple's Cocoa code), but source-level debugging worked, so I was able to
track down the problem.
Turns out it was a misusage on my part, rather than a GHC bug, but it
should be documented so nobody else has this confusion. The issue was
that the memory I had passed to hs_init() was not my real argc and argv,
but rather a massaged version that I had dynamically allocated, and was
freeing immediately after hs_init() returns. Since the code that outputs
the profiling data assumes that memory is statically allocated and
therefore still valid, I was getting intermittent crashes.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5177#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