Daniel Howe wrote:

> Hey,
> All of a sudden I've started to get seg. faults on launch of mozilla. I 
> haven't changed anyting in Permission_Add(); (it still uses nsString) - 
> Gdb gives me the following backtrace... Anyone seen this before???
> 
> #0  0x4036931b in free () from /lib/libc.so.6
> #1  0x4022b5ea in PR_Free () from /mozilla/dist/lib/libnspr4.so
> #2  0x40166aa2 in nsMemoryImpl::Free () from /mozilla/dist/lib/libxpcom.so
> #3  0x4016711e in nsMemory::Free () from /mozilla/dist/lib/libxpcom.so
> #4  0x4013119e in nsStr::Free () from /mozilla/dist/lib/libxpcom.so
> #5  0x4013050c in nsStr::Destroy () from /mozilla/dist/lib/libxpcom.so
> #6  0x40134047 in nsString::~nsString () from /mozilla/dist/lib/libxpcom.so
> #7  0x40f8bdf9 in nsCookieService::Permission_Add ()
>    from /mozilla/dist/bin/components/libcookie.so


Crashes in the malloc()/free() code are almost always caused by 
double-freeing of a pointer, or freeing a pointer that wasn't allocated 
by malloc, in my experience.

If you're on Linux, doing
   export MALLOC_CHECK_=2
(note the trailing underscore; man malloc has details) can help you 
track it down.

Mike


Reply via email to