Closed Bug 50611 Opened 24 years ago Closed 24 years ago

Shutdown memory errors in JS component loader(?)

Categories

(Core :: XPConnect, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 52940

People

(Reporter: bruce, Assigned: jband_mozilla)

Details

These showed up in a build from Sunday, August 27 at shutdown.

There are several errors below, but they all seem somewhat related.

****  Purify instrumented ../../xpfe/bootstrap/mozilla-bin.pure (pid 5538)  ****
ABR: Array bounds read:
  * This is occurring while in:
        JS_GetRuntime  [jsapi.c:831]
        
AutoPushCompatibleJSContext::AutoPushCompatibleJSContext(JSRuntime*,nsXPConnect*
) [nsXPConnect.cpp:79]
        nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*,unsigned short,const 
nsXPTMethodInfo*,nsXPTCMiniVariant*) [xpcwrappedjsclass.cpp:476]
        nsXPCWrappedJS::CallMethod(unsigned short,const 
nsXPTMethodInfo*,nsXPTCMiniVariant*) [xpcwrappedjs.cpp:318]
        PrepareAndDispatch [xptcstubs_sparc_solaris.cpp:103]
        SharedStub     [libxpcom.so]
        nsXPTCStubBase::Stub6() [xptcstubsdef.inc:8]
        UnloadAndReleaseModules(PLHashEntry*,int,void*) 
[mozJSComponentLoader.cpp:209]
        PL_HashTableEnumerateEntries [plhash.c:413]
        mozJSComponentLoader::UnloadAll(int) [mozJSComponentLoader.cpp:1106]
        CanUnload_enumerate(nsHashKey*,void*,void*) 
[nsComponentManager.cpp:1835]
        _hashEnumerate(PLHashEntry*,int,void*) [nsHashtable.cpp:193]
        PL_HashTableEnumerateEntries [plhash.c:413]
        nsHashtable::Enumerate(int(*)(nsHashKey*,void*,void*),void*) 
[nsHashtable.cpp:350]
        nsSupportsHashtable::Enumerate(int(*)(nsHashKey*,void*,void*),void*) 
[nsHashtable.h:157]
        nsComponentManagerImpl::UnloadLibraries(nsIServiceManager*,int) 
[nsComponentManager.cpp:1869]
        nsComponentManagerImpl::Shutdown() [nsComponentManager.cpp:353]
        NS_ShutdownXPCOM(nsIServiceManager*) [nsXPComInit.cpp:655]
        main           [nsAppRunner.cpp:1147]
        _start         [crt1.o]
  * Reading 4 bytes from 0x38ab94 in the heap.
  * Address 0x38ab94 is 181 bytes past end of a malloc'd block at 0x38a6e0 of 
1024 bytes.
  * This block was allocated from:
        malloc         [rtlib.o]
        g_malloc       [gmem.c:177]
        g_mem_chunk_alloc [gmem.c:651]
        g_hash_node_new [ghash.c:369]
        g_hash_table_insert [ghash.c:168]
        _gdk_pixmap_create_from_xpm [gdkpixmap.c:539]
        gdk_pixmap_colormap_create_from_xpm [gdkpixmap.c:688]
        gdk_pixmap_create_from_xpm [gdkpixmap.c:704]
        nsWindow::SetIcon() [nsWindow.cpp:2279]
        nsWindow::OnRealize(_GtkWidget*) [nsWindow.cpp:2841]
        nsWidget::RealizeSignal(_GtkWidget*,void*) [nsWidget.cpp:2676]
        gtk_marshal_NONE__NONE [gtkmarshal.c:344]
        gtk_handlers_run [gtksignal.c:1917]
        gtk_signal_real_emit [gtksignal.c:1477]
        gtk_signal_emit [gtksignal.c:552]
        gtk_widget_realize [gtkwidget.c:1652]
        gtk_widget_realize [gtkwidget.c:1648]
        nsWindow::CreateNative(_GtkObject*) [nsWindow.cpp:1895]
        nsWidget::CreateWidget(nsIWidget*,const 
nsRect&,nsEventStatus(*)(nsGUIEvent*),nsIDeviceContext*,nsIAppShell*,nsIToolkit*
,nsWidgetInitData*,void*) [nsWidget.cpp:1218]
        nsWidget::Create(nsIWidget*,const 
nsRect&,nsEventStatus(*)(nsGUIEvent*),nsIDeviceContext*,nsIAppShell*,nsIToolkit*
,nsWidgetInitData*) [nsWidget.cpp:1285]
        
nsWebShellWindow::Initialize(nsIXULWindow*,nsIAppShell*,nsIURI*,int,int,int,unsi
gned int,int,int,nsWidgetInitData&) [nsWebShellWindow.cpp:314]
        
nsAppShellService::JustCreateTopWindow(nsIXULWindow*,nsIURI*,int,int,unsigned 
int,int,int,nsIXULWindow**) [nsAppShellService.cpp:614]
        nsAppShellService::CreateHiddenWindow() [nsAppShellService.cpp:203]
        main1(int,char**,nsISupports*) [nsAppRunner.cpp:923]
        main           [nsAppRunner.cpp:1139]

****  Purify instrumented ../../xpfe/bootstrap/mozilla-bin.pure (pid 5538)  ****
ABR: Array bounds read:
  * This is occurring while in:
        JS_GetRuntime  [jsapi.c:831]
        nsXPConnect::GetContext(JSContext*,nsXPConnect*) [nsXPConnect.cpp:365]
        nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*,unsigned short,const 
nsXPTMethodInfo*,nsXPTCMiniVariant*) [xpcwrappedjsclass.cpp:481]
        nsXPCWrappedJS::CallMethod(unsigned short,const 
nsXPTMethodInfo*,nsXPTCMiniVariant*) [xpcwrappedjs.cpp:318]
        PrepareAndDispatch [xptcstubs_sparc_solaris.cpp:103]
        SharedStub     [libxpcom.so]
        nsXPTCStubBase::Stub6() [xptcstubsdef.inc:8]
        UnloadAndReleaseModules(PLHashEntry*,int,void*) 
[mozJSComponentLoader.cpp:209]
        PL_HashTableEnumerateEntries [plhash.c:413]
        mozJSComponentLoader::UnloadAll(int) [mozJSComponentLoader.cpp:1106]
        CanUnload_enumerate(nsHashKey*,void*,void*) 
[nsComponentManager.cpp:1835]
        _hashEnumerate(PLHashEntry*,int,void*) [nsHashtable.cpp:193]
        PL_HashTableEnumerateEntries [plhash.c:413]
        nsHashtable::Enumerate(int(*)(nsHashKey*,void*,void*),void*) 
[nsHashtable.cpp:350]
        nsSupportsHashtable::Enumerate(int(*)(nsHashKey*,void*,void*),void*) 
[nsHashtable.h:157]
        nsComponentManagerImpl::UnloadLibraries(nsIServiceManager*,int) 
[nsComponentManager.cpp:1869]
        nsComponentManagerImpl::Shutdown() [nsComponentManager.cpp:353]
        NS_ShutdownXPCOM(nsIServiceManager*) [nsXPComInit.cpp:655]
        main           [nsAppRunner.cpp:1147]
        _start         [crt1.o]
  * Reading 4 bytes from 0x38ab94 in the heap.
  * Address 0x38ab94 is 181 bytes past end of a malloc'd block at 0x38a6e0 of 
1024 bytes.
  * This block was allocated from:
        malloc         [rtlib.o]
        g_malloc       [gmem.c:177]
        g_mem_chunk_alloc [gmem.c:651]
        g_hash_node_new [ghash.c:369]
        g_hash_table_insert [ghash.c:168]
        _gdk_pixmap_create_from_xpm [gdkpixmap.c:539]
        gdk_pixmap_colormap_create_from_xpm [gdkpixmap.c:688]
        gdk_pixmap_create_from_xpm [gdkpixmap.c:704]
        nsWindow::SetIcon() [nsWindow.cpp:2279]
        nsWindow::OnRealize(_GtkWidget*) [nsWindow.cpp:2841]
        nsWidget::RealizeSignal(_GtkWidget*,void*) [nsWidget.cpp:2676]
        gtk_marshal_NONE__NONE [gtkmarshal.c:344]
        gtk_handlers_run [gtksignal.c:1917]
        gtk_signal_real_emit [gtksignal.c:1477]
        gtk_signal_emit [gtksignal.c:552]
        gtk_widget_realize [gtkwidget.c:1652]
        gtk_widget_realize [gtkwidget.c:1648]
        nsWindow::CreateNative(_GtkObject*) [nsWindow.cpp:1895]
        nsWidget::CreateWidget(nsIWidget*,const 
nsRect&,nsEventStatus(*)(nsGUIEvent*),nsIDeviceContext*,nsIAppShell*,nsIToolkit*
,nsWidgetInitData*,void*) [nsWidget.cpp:1218]
        nsWidget::Create(nsIWidget*,const 
nsRect&,nsEventStatus(*)(nsGUIEvent*),nsIDeviceContext*,nsIAppShell*,nsIToolkit*
,nsWidgetInitData*) [nsWidget.cpp:1285]
        
nsWebShellWindow::Initialize(nsIXULWindow*,nsIAppShell*,nsIURI*,int,int,int,unsi
gned int,int,int,nsWidgetInitData&) [nsWebShellWindow.cpp:314]
        
nsAppShellService::JustCreateTopWindow(nsIXULWindow*,nsIURI*,int,int,unsigned 
int,int,int,nsIXULWindow**) [nsAppShellService.cpp:614]
        nsAppShellService::CreateHiddenWindow() [nsAppShellService.cpp:203]
        main1(int,char**,nsISupports*) [nsAppRunner.cpp:923]
        main           [nsAppRunner.cpp:1139]

****  Purify instrumented ../../xpfe/bootstrap/mozilla-bin.pure (pid 5538)  ****
ABR: Array bounds read:
  * This is occurring while in:
        JS_SetErrorReporter [jsapi.c:3416]
        nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*,unsigned short,const 
nsXPTMethodInfo*,nsXPTCMiniVariant*) [xpcwrappedjsclass.cpp:505]
        nsXPCWrappedJS::CallMethod(unsigned short,const 
nsXPTMethodInfo*,nsXPTCMiniVariant*) [xpcwrappedjs.cpp:318]
        PrepareAndDispatch [xptcstubs_sparc_solaris.cpp:103]
        SharedStub     [libxpcom.so]
        nsXPTCStubBase::Stub6() [xptcstubsdef.inc:8]
        UnloadAndReleaseModules(PLHashEntry*,int,void*) 
[mozJSComponentLoader.cpp:209]
        PL_HashTableEnumerateEntries [plhash.c:413]
        mozJSComponentLoader::UnloadAll(int) [mozJSComponentLoader.cpp:1106]
        CanUnload_enumerate(nsHashKey*,void*,void*) 
[nsComponentManager.cpp:1835]
        _hashEnumerate(PLHashEntry*,int,void*) [nsHashtable.cpp:193]
        PL_HashTableEnumerateEntries [plhash.c:413]
        nsHashtable::Enumerate(int(*)(nsHashKey*,void*,void*),void*) 
[nsHashtable.cpp:350]
        nsSupportsHashtable::Enumerate(int(*)(nsHashKey*,void*,void*),void*) 
[nsHashtable.h:157]
        nsComponentManagerImpl::UnloadLibraries(nsIServiceManager*,int) 
[nsComponentManager.cpp:1869]
        nsComponentManagerImpl::Shutdown() [nsComponentManager.cpp:353]
        NS_ShutdownXPCOM(nsIServiceManager*) [nsXPComInit.cpp:655]
        main           [nsAppRunner.cpp:1147]
        _start         [crt1.o]
  * Reading 4 bytes from 0x38acb8 in the heap.
  * Address 0x38acb8 is 473 bytes past end of a malloc'd block at 0x38a6e0 of 
1024 bytes.
  * This block was allocated from:
        malloc         [rtlib.o]
        g_malloc       [gmem.c:177]
        g_mem_chunk_alloc [gmem.c:651]
        g_hash_node_new [ghash.c:369]
        g_hash_table_insert [ghash.c:168]
        _gdk_pixmap_create_from_xpm [gdkpixmap.c:539]
        gdk_pixmap_colormap_create_from_xpm [gdkpixmap.c:688]
        gdk_pixmap_create_from_xpm [gdkpixmap.c:704]
        nsWindow::SetIcon() [nsWindow.cpp:2279]
        nsWindow::OnRealize(_GtkWidget*) [nsWindow.cpp:2841]
        nsWidget::RealizeSignal(_GtkWidget*,void*) [nsWidget.cpp:2676]
        gtk_marshal_NONE__NONE [gtkmarshal.c:344]
        gtk_handlers_run [gtksignal.c:1917]
        gtk_signal_real_emit [gtksignal.c:1477]
        gtk_signal_emit [gtksignal.c:552]
        gtk_widget_realize [gtkwidget.c:1652]
        gtk_widget_realize [gtkwidget.c:1648]
        nsWindow::CreateNative(_GtkObject*) [nsWindow.cpp:1895]
        nsWidget::CreateWidget(nsIWidget*,const 
nsRect&,nsEventStatus(*)(nsGUIEvent*),nsIDeviceContext*,nsIAppShell*,nsIToolkit*
,nsWidgetInitData*,void*) [nsWidget.cpp:1218]
        nsWidget::Create(nsIWidget*,const 
nsRect&,nsEventStatus(*)(nsGUIEvent*),nsIDeviceContext*,nsIAppShell*,nsIToolkit*
,nsWidgetInitData*) [nsWidget.cpp:1285]
        
nsWebShellWindow::Initialize(nsIXULWindow*,nsIAppShell*,nsIURI*,int,int,int,unsi
gned int,int,int,nsWidgetInitData&) [nsWebShellWindow.cpp:314]
        
nsAppShellService::JustCreateTopWindow(nsIXULWindow*,nsIURI*,int,int,unsigned 
int,int,int,nsIXULWindow**) [nsAppShellService.cpp:614]
        nsAppShellService::CreateHiddenWindow() [nsAppShellService.cpp:203]
        main1(int,char**,nsISupports*) [nsAppRunner.cpp:923]
        main           [nsAppRunner.cpp:1139]

****  Purify instrumented ../../xpfe/bootstrap/mozilla-bin.pure (pid 5538)  ****
ABW: Array bounds write:
  * This is occurring while in:
        JS_SetErrorReporter [jsapi.c:3417]
        nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*,unsigned short,const 
nsXPTMethodInfo*,nsXPTCMiniVariant*) [xpcwrappedjsclass.cpp:505]
        nsXPCWrappedJS::CallMethod(unsigned short,const 
nsXPTMethodInfo*,nsXPTCMiniVariant*) [xpcwrappedjs.cpp:318]
        PrepareAndDispatch [xptcstubs_sparc_solaris.cpp:103]
        SharedStub     [libxpcom.so]
        nsXPTCStubBase::Stub6() [xptcstubsdef.inc:8]
        UnloadAndReleaseModules(PLHashEntry*,int,void*) 
[mozJSComponentLoader.cpp:209]
        PL_HashTableEnumerateEntries [plhash.c:413]
        mozJSComponentLoader::UnloadAll(int) [mozJSComponentLoader.cpp:1106]
        CanUnload_enumerate(nsHashKey*,void*,void*) 
[nsComponentManager.cpp:1835]
        _hashEnumerate(PLHashEntry*,int,void*) [nsHashtable.cpp:193]
        PL_HashTableEnumerateEntries [plhash.c:413]
        nsHashtable::Enumerate(int(*)(nsHashKey*,void*,void*),void*) 
[nsHashtable.cpp:350]
        nsSupportsHashtable::Enumerate(int(*)(nsHashKey*,void*,void*),void*) 
[nsHashtable.h:157]
        nsComponentManagerImpl::UnloadLibraries(nsIServiceManager*,int) 
[nsComponentManager.cpp:1869]
        nsComponentManagerImpl::Shutdown() [nsComponentManager.cpp:353]
        NS_ShutdownXPCOM(nsIServiceManager*) [nsXPComInit.cpp:655]
        main           [nsAppRunner.cpp:1147]
        _start         [crt1.o]
  * Writing 4 bytes to 0x38acb8 in the heap.
  * Address 0x38acb8 is 473 bytes past end of a malloc'd block at 0x38a6e0 of 
1024 bytes.
  * This block was allocated from:
        malloc         [rtlib.o]
        g_malloc       [gmem.c:177]
        g_mem_chunk_alloc [gmem.c:651]
        g_hash_node_new [ghash.c:369]
        g_hash_table_insert [ghash.c:168]
        _gdk_pixmap_create_from_xpm [gdkpixmap.c:539]
        gdk_pixmap_colormap_create_from_xpm [gdkpixmap.c:688]
        gdk_pixmap_create_from_xpm [gdkpixmap.c:704]
        nsWindow::SetIcon() [nsWindow.cpp:2279]
        nsWindow::OnRealize(_GtkWidget*) [nsWindow.cpp:2841]
        nsWidget::RealizeSignal(_GtkWidget*,void*) [nsWidget.cpp:2676]
        gtk_marshal_NONE__NONE [gtkmarshal.c:344]
        gtk_handlers_run [gtksignal.c:1917]
        gtk_signal_real_emit [gtksignal.c:1477]
        gtk_signal_emit [gtksignal.c:552]
        gtk_widget_realize [gtkwidget.c:1652]
        gtk_widget_realize [gtkwidget.c:1648]
        nsWindow::CreateNative(_GtkObject*) [nsWindow.cpp:1895]
        nsWidget::CreateWidget(nsIWidget*,const 
nsRect&,nsEventStatus(*)(nsGUIEvent*),nsIDeviceContext*,nsIAppShell*,nsIToolkit*
,nsWidgetInitData*,void*) [nsWidget.cpp:1218]
        nsWidget::Create(nsIWidget*,const 
nsRect&,nsEventStatus(*)(nsGUIEvent*),nsIDeviceContext*,nsIAppShell*,nsIToolkit*
,nsWidgetInitData*) [nsWidget.cpp:1285]
        
nsWebShellWindow::Initialize(nsIXULWindow*,nsIAppShell*,nsIURI*,int,int,int,unsi
gned int,int,int,nsWidgetInitData&) [nsWebShellWindow.cpp:314]
        
nsAppShellService::JustCreateTopWindow(nsIXULWindow*,nsIURI*,int,int,unsigned 
int,int,int,nsIXULWindow**) [nsAppShellService.cpp:614]
        nsAppShellService::CreateHiddenWindow() [nsAppShellService.cpp:203]
        main1(int,char**,nsISupports*) [nsAppRunner.cpp:923]
        main           [nsAppRunner.cpp:1139]
jband: these look like they're in your territory.
Assignee: shaver → jband
Bruce, Are you sure this build was from fresh sources pulled on the date you 
said? Perhaps a couple of days older maybe?

This looks like http://bugzilla.mozilla.org/show_bug.cgi?id=49748 
But the fix for that went in on Aug 25.

I'm not seeing this problem running under Purify on NT.
I have no idea anymore.  I'll be doing a pull and build sometime soon.  I'll 
know if I still see them then I guess.
Bruce, I spoke too soon. Last night I played with it more for a bit. After 
touching components/*.js I did see this under Purify. But, I tried and didn't 
manage to reproduce under the debugger well enough too work it out.

I was convinced I had this nailed, but I was wrong. I'll dig in more.

Thanks!

John.
Marking as dup - patch in other bug.

*** This bug has been marked as a duplicate of 52940 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Marking Verified -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.