Closed Bug 32610 Opened 24 years ago Closed 24 years ago

UMR: nsReplacementPolicy::LoadAllRecordsInAllCacheDatabases()

Categories

(Core :: Networking: Cache, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: bruce, Assigned: davidm)

Details

I get this a long ways into downloading a file (Somewhere around 1 to 1.5M into
it).

      UMR: Uninitialized memory read
      This is occurring while in:
            nsReplacementPolicy::LoadAllRecordsInAllCacheDatabases()
[nsReplacementPolicy.cpp:612]
               nsReplacementPolicy::LoadAllRecordsInAllCacheDatabases()
               {
                   // We been here before ?
            =>     if (mLoadedAllDatabaseRecords)
                       return NS_OK;
               
                   nsresult rv;
            nsReplacementPolicy::Evict(unsigned int)
[nsReplacementPolicy.cpp:647]
            nsCacheManager::LimitMemCacheSize() [nsCacheManager.cpp:488]
            nsCacheManager::LimitCacheSize() [nsCacheManager.cpp:522]
            CacheOutputStream::Write(const char*,unsigned int,unsigned int*)
[nsCacheEntryChannel.cpp:89]
            InterceptStreamListener::write(char*,unsigned int)
[nsCachedNetData.cpp:1157]
            InterceptStreamListener::Read(char*,unsigned int,unsigned int*)
[nsCachedNetData.cpp:1145]
           
nsStreamXferOp::OnDataAvailable(nsIChannel*,nsISupports*,nsIInputStream*,unsigned
int,unsigned int) [nsStreamXferOp.cpp:313]
           
InterceptStreamListener::OnDataAvailable(nsIChannel*,nsISupports*,nsIInputStream*,unsigned
int,unsigned int) [nsCachedNetData.cpp:1129]
           
nsHTTPServerListener::OnDataAvailable(nsIChannel*,nsISupports*,nsIInputStream*,unsigned
int,unsigned int) [nsHTTPResponseListener.cpp:382]
            nsOnDataAvailableEvent::HandleEvent()
[nsAsyncStreamListener.cpp:384]
            nsStreamListenerEvent::HandlePLEvent(PLEvent*)
[nsAsyncStreamListener.cpp:97]
            PL_HandleEvent [plevent.c:563]
            PL_ProcessPendingEvents [plevent.c:508]
            nsEventQueueImpl::ProcessPendingEvents() [nsEventQueue.cpp:314]
            event_processor_callback(void*,int,GdkInputCondition)
[nsAppShell.cpp:141]
            our_gdk_io_invoke(_GIOChannel*,GIOCondition,void*)
[nsAppShell.cpp:54]
            g_io_unix_dispatch [giounix.c:131]
            g_main_dispatch [gmain.c:647]
            g_main_iterate [gmain.c:854]
            g_main_run     [gmain.c:912]
            gtk_main       [gtkmain.c:475]
            nsAppShell::Run() [nsAppShell.cpp:303]
            nsNativeViewerApp::Run() [nsGtkMain.cpp:55]
            main           [nsGtkMain.cpp:173]
            _start         [crt1.o]
      Reading 4 bytes from 0x8e6928 in the heap.
      Address 0x8e6928 is 40 bytes into a malloc'd block at 0x8e6900 of 44
bytes.
      This block was allocated from:
            malloc         [rtlib.o]
            __bUiLtIn_nEw  [libxpcom.so]
            __builtin_new  [rtlib.o]
            nsCacheManager::Init() [nsCacheManager.cpp:170]
                   // TODO - Load any extension caches here
               
                   // Initialize replacement policy for memory cache module
            =>     mMemSpaceManager = new nsReplacementPolicy;
                   if (!mMemSpaceManager)
                       return NS_ERROR_OUT_OF_MEMORY;
                   rv = mMemSpaceManager->Init(MAX_MEM_CACHE_ENTRIES);
            nsCacheManagerConstructor(nsISupports*,const nsID&,void**)
[nsNetDataCacheModule.cpp:41]
            nsGenericFactory::CreateInstance(nsISupports*,const nsID&,void**)
[nsGenericFactory.cpp:47]
            nsComponentManagerImpl::CreateInstance(const
nsID&,nsISupports*,const nsID&,void**) [nsComponentManager.cpp:1156]
            nsComponentManager::CreateInstance(const nsID&,nsISupports*,const
nsID&,void**) [nsRepository.cpp:81]
            nsServiceManagerImpl::GetService(const nsID&,const
nsID&,nsISupports**,nsIShutdownListener*) [nsServiceManager.cpp:293]
            nsServiceManagerImpl::GetService(const char*,const
nsID&,nsISupports**,nsIShutdownListener*) [nsServiceManager.cpp:431]
            nsServiceManager::GetService(const char*,const
nsID&,nsISupports**,nsIShutdownListener*) [nsServiceManager.cpp:544]
            nsGetServiceByProgID::operator ()(const nsID&,void**)const
[nsServiceManager.cpp:63]
            nsCOMPtr<nsINetDataCacheManager>::assign_from_helper(const
nsCOMPtr_helper&,const nsID&) [nsCOMPtr.h:813]
           
nsCOMPtr<nsINetDataCacheManager>::nsCOMPtr<nsINetDataCacheManager>(const
nsCOMPtr_helper&) [nsCOMPtr.h:515]
            nsHTTPChannel::CheckCache() [nsHTTPChannel.cpp:726]
            nsHTTPChannel::Open() [nsHTTPChannel.cpp:1117]
            nsHTTPChannel::AsyncRead(unsigned
int,int,nsISupports*,nsIStreamListener*) [nsHTTPChannel.cpp:276]
            nsDocumentOpenInfo::Open(nsIChannel*,int,const char*,nsISupports*)
[nsURILoader.cpp:246]
            nsURILoader::OpenURIVia(nsIChannel*,int,const
char*,nsISupports*,unsigned int) [nsURILoader.cpp:591]
            nsURILoader::OpenURI(nsIChannel*,int,const char*,nsISupports*)
[nsURILoader.cpp:510]
            nsWebShell::DoLoadURL(nsIURI*,const char*,nsIInputStream*,unsigned
int,unsigned int,const unsigned short*,const char*,int) [nsWebShell.cpp:1243]
            nsWebShell::LoadURI(nsIURI*,const char*,nsIInputStream*,int,unsigned
int,unsigned int,nsISupports*,const unsigned short*,const char*)
[nsWebShell.cpp:1481]
            nsWebShell::LoadURL(const unsigned short*,const
char*,nsIInputStream*,int,unsigned int,unsigned int,nsISupports*,const unsigned
short*,const char*) [nsWebShell.cpp:1764]
            nsBrowserWindow::GoTo(const unsigned short*,const char*)
[nsBrowserWindow.cpp:1047]
            nsViewerApp::OpenWindow() [nsViewerApp.cpp:728]
            nsNativeViewerApp::Run() [nsGtkMain.cpp:48]
            main           [nsGtkMain.cpp:173]
            _start         [crt1.o]
Should be able to just initialie that to PR_FALSE in the constructor.
=> davidm
Assignee: gordon → davidm
Target Milestone: --- → M15
added initializer
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
verified: 
NT 2000042009
Linux 2000042609
Mac 2000041810
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.