[OpenSIPS-Users] segmentation fault when calling pkg_malloc
Dan Pascu
dan at ag-projects.com
Sun Mar 15 04:43:53 CET 2009
On Thursday 12 March 2009, Vasil Kolev wrote:
> This doesn't seem like running out of memory, more like a memory
> corruption. The first thing to check is if either 'frag' or 'f' are
> NULL or invalid (e.g. in gdb do "print f", "print frag" and see what
> does that say). After that try dereferencing them, seeing how could
> they get these values, etc.
I've seen this thing before. I'm willing to bet that the pointers are not
NULL. They are most likely composed of ascii byte codes from some SIP
message header (as a result of the allocator memory being overwritten by
part of the processed message).
Unfortunately I have no idea what causes this, and the only solution to a
similar problem I was experiencing was to replace the opensips private
memory allocator with the system memory allocator when building opensips.
Maybe the thread author can try using the system memory allocator to see
if the problem goes away. If so, we definitely have a problem with the
memory allocator. If not, he may have a different issue somewhere else in
his code.
--
Dan
More information about the Users
mailing list