invalid pointer reading in NSPR?

VERIFIED INVALID

Status

NSPR
NSPR
P3
normal
VERIFIED INVALID
19 years ago
19 years ago

People

(Reporter: Bruce Mitchener, Assigned: srinivas)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
2 errors... mozilla pull from evening (PST) of March 9, 1999.  NSPR pull and
build from March 8, 1999.  Solaris 2.6, gcc 2.7.2.3, purify.

****  Purify instrumented ./apprunner.pure (pid 1154)  ****
IPR: Invalid pointer read:
  * This is occurring while in:
        strlen         [rtlib.o]
        DLLErrorInternal [prlink.c:131]
        PR_LoadLibrary [prlink.c:732]
        nsDll::Load()  [xcDll.cpp:150]
        nsComponentManagerImpl::LoadFactory(nsFactoryEntry*,nsIFactory**)
[nsComponentManager.cpp:797]
        nsComponentManagerImpl::FindFactory(const nsID&,nsIFactory**)
[nsComponentManager.cpp:903]
        nsComponentManagerImpl::CreateInstance(const nsID&,nsISupports*,const
nsID&,void**) [nsComponentManager.cpp:1061]
        nsComponentManager::CreateInstance(const nsID&,nsISupports*,const
nsID&,void**) [nsRepository.cpp:67]
        nsServiceManagerImpl::GetService(const nsID&,const
nsID&,nsISupports**,nsIShutdownListener*) [nsServiceManager.cpp:229]
        nsServiceManager::GetService(const nsID&,const
nsID&,nsISupports**,nsIShutdownListener*) [nsServiceManager.cpp:391]
        nsWebShell::CreatePluginHost(int) [nsWebShell.cpp:406]
        nsWebShell::Init(void*,int,int,int,int,nsScrollPreference,int,int)
[nsWebShell.cpp:727]

nsWebShellWindow::Initialize(nsIWidget*,nsIAppShell*,nsIURL*,nsString&,nsIStream
Observer*,nsIXULWindowCallbacks*,int,int) [nsWebShellWindow.cpp:227]

nsAppShellService::CreateTopLevelWindow(nsIWidget*,nsIURL*,nsString&,nsIWidget*&
,nsIStreamObserver*,nsIXULWindowCallbacks*,int,int) [nsAppShellService.cpp:233]
        main           [nsAppRunner.cpp:275]
        _start         [crt1.o]
  * Reading 90 bytes from 0xebb3062c between the heap and the stack.

****  Purify instrumented ./apprunner.pure (pid 1154)  ****
IPR: Invalid pointer read:
  * This is occurring while in:
        memcpy         [rtlib.o]
        PR_SetErrorText [prerror.c:69]
        DLLErrorInternal [prlink.c:131]
        PR_LoadLibrary [prlink.c:732]
        nsDll::Load()  [xcDll.cpp:150]
        nsComponentManagerImpl::LoadFactory(nsFactoryEntry*,nsIFactory**)
[nsComponentManager.cpp:797]
        nsComponentManagerImpl::FindFactory(const nsID&,nsIFactory**)
[nsComponentManager.cpp:903]
        nsComponentManagerImpl::CreateInstance(const nsID&,nsISupports*,const
nsID&,void**) [nsComponentManager.cpp:1061]
        nsComponentManager::CreateInstance(const nsID&,nsISupports*,const
nsID&,void**) [nsRepository.cpp:67]
        nsServiceManagerImpl::GetService(const nsID&,const
nsID&,nsISupports**,nsIShutdownListener*) [nsServiceManager.cpp:229]
        nsServiceManager::GetService(const nsID&,const
nsID&,nsISupports**,nsIShutdownListener*) [nsServiceManager.cpp:391]
        nsWebShell::CreatePluginHost(int) [nsWebShell.cpp:406]
        nsWebShell::Init(void*,int,int,int,int,nsScrollPreference,int,int)
[nsWebShell.cpp:727]

nsWebShellWindow::Initialize(nsIWidget*,nsIAppShell*,nsIURL*,nsString&,nsIStream
Observer*,nsIXULWindowCallbacks*,int,int) [nsWebShellWindow.cpp:227]

nsAppShellService::CreateTopLevelWindow(nsIWidget*,nsIURL*,nsString&,nsIWidget*&
,nsIStreamObserver*,nsIXULWindowCallbacks*,int,int) [nsAppShellService.cpp:233]
        main           [nsAppRunner.cpp:275]
        _start         [crt1.o]
  * Reading 90 bytes from 0xebb3062c between the heap and the stack.

Updated

19 years ago
Assignee: wtc → srinivas

Comment 1

19 years ago
New bugs should be assigned to
module owners.
(Assignee)

Comment 2

19 years ago
The system function dlerror() is called when the dlopen() call from
PR_LoadLibrary fails to load the library (most likely, either because the
library doesn't exist or incorrect path to the library is used).Dlerror() should
return either a pointer to a null-terminated string or NULL. The nspr function
DLLErrorInternal() passes the non-NULL string pointer from dlopen() to strlen
and memcpy.

I could reproduce this purify warning by trying to load a non-existent library.
The problem appears to be either

1. purify incorrectly reporting a IPR error or
2. the dlerror() function in the Solaris libdl library returning a pointer to
invalid memory.
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED

Comment 3

19 years ago
NSPR now has its own Bugzilla product.  Moving this bug to the NSPR product.
(Assignee)

Comment 4

19 years ago
The pointer returned by dlerror() is from a valid memory address; the truss
output shows the corresponding mmap call.

This bug should be closed as invalid.
(Assignee)

Updated

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → INVALID

Updated

19 years ago
Status: RESOLVED → VERIFIED

Comment 5

19 years ago
verified invalid
You need to log in before you can comment on or make changes to this bug.