Closed
Bug 2248
Opened 26 years ago
Closed 26 years ago
PR_ImportFile, etc. should initialize NSPR implicitly.
Categories
(NSPR :: NSPR, defect, P2)
NSPR
NSPR
Tracking
(Not tracked)
CLOSED
FIXED
People
(Reporter: wtc, Assigned: wtc)
Details
This bug is reported by John McMullen (mcmullen@netscape.com).
PR_ImportFile, PR_ImportTCPSocket, and PR_ImportUDPSocket
are not initializing NSPR implicitly. So if PR_ImportFile
is the first NSPR function your program calls, your program
will trigger this assertion failure (in a debug build):
Assertion failure: NULL != _pr_fd_cache.stack, at prfdcach.c:77
Abort (core dumped)
The fix is to add the following line to the beginning of
PR_ImportFile, PR_ImportTCPSocket, and PR_ImportUDPSocket:
if (!_pr_initialized) _PR_ImplicitInitialization();
A workaround is to add a dummy PR_GetCurrentThread() call
before your PR_ImportFile call. The PR_GetCurrentThread()
call forces NSPR to initialize.
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 1•26 years ago
|
||
Fixed on the tip.
/cvsroot/mozilla/nsprpub/pr/src/io/prfile.c, revision 3.9.
/cvsroot/mozilla/nsprpub/pr/src/io/prsocket.c, revision 3.11.
/cvsroot/mozilla/nsprpub/pr/src/pthreads/ptio.c, revision 3.10.
(Also fixed in the internal cvs repository:
/m/src/ns/nspr20/pr/src/io/prfile.c, revision 2.12.
/m/src/ns/nspr20/pr/src/io/prsocket.c, revision 2.22.
/m/src/ns/nspr20/pr/src/pthreads/ptio.c, revision 2.42.)
Assignee | ||
Updated•26 years ago
|
Status: RESOLVED → CLOSED
Assignee | ||
Comment 2•26 years ago
|
||
Closed the bug.
Comment 3•25 years ago
|
||
NSPR now has its own Bugzilla product. Moving this bug to the NSPR product.
You need to log in
before you can comment on or make changes to this bug.
Description
•