[libxml-devel] More crashes, in malloc...
Luc Heinrich
luc at honk-honk.com
Mon Feb 11 15:29:22 EST 2008
On 11 févr. 08, at 18:57, Dan Janowski wrote:
> Since it is OS X, did you try to enable any of the malloc debug
> (man malloc)? There are a whole bunch of env vars that can be set,
> sometimes they provide useful information.
Yes, actually, I did. I enabled MallocStackLogging and
MallocStackLoggingNoCompact, then ran the application and waited for
it to crash, which usually happens after a minute or so.
Just before crashing, stderr usually shows messages like this one:
ruby(9697,0xa000ed88) malloc: *** Deallocation of a pointer not
malloced: 0x2113800; This could be a double free(), or free() called
with the middle of an allocated block; Try setting environment
variable MallocHelp to see tools to help debug.
Which is not so helpful. Fortunately I sometime was in a position
where the malloc error messages were displayed but the application
was not crashed yet, so I was able to use the malloc_history command
to dig deeper: every single time the error message was caused by the
following sequence:
0 xmlCleanupCharEncodingHandlers
1 xmlCleanupParser
2 ruby_xml_state_free
3 obj_free
4 ....
Which would mean that 'ruby_xml_state_free' is called when it
shouldn't be. Or something... :)
--
Luc Heinrich
More information about the libxml-devel
mailing list