Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 315638 Details for
Bug 459297
(curl NSS) Firefox crash during Flash 10 teardown
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Add locking around NSS_Initialize()
curl.diff (text/plain), 1.54 KB, created by
Rob Crittenden
on 2008-09-03 13:05:44 UTC
(
hide
)
Description:
Add locking around NSS_Initialize()
Filename:
MIME Type:
Creator:
Rob Crittenden
Created:
2008-09-03 13:05:44 UTC
Size:
1.54 KB
patch
obsolete
>diff -u --recursive curl-7.18.2.orig/lib/nss.c curl-7.18.2/lib/nss.c >--- curl-7.18.2.orig/lib/nss.c 2008-05-26 11:02:49.000000000 -0400 >+++ curl-7.18.2/lib/nss.c 2008-09-03 08:51:41.000000000 -0400 >@@ -73,6 +73,8 @@ > > PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd); > >+PRLock * nss_initlock = NULL; >+ > int initialized = 0; > > #define HANDSHAKE_TIMEOUT 30 >@@ -718,9 +720,12 @@ > * @retval 1 SSL initialized successfully > */ > int Curl_nss_init(void) >-{ >- if(!initialized) >+{ >+ /* curl_global_init() is not thread-safe so this test is ok */ >+ if (nss_initlock == NULL) { > PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256); >+ nss_initlock = PR_NewLock(); >+ } > > /* We will actually initialize NSS later */ > >@@ -730,7 +735,12 @@ > /* Global cleanup */ > void Curl_nss_cleanup(void) > { >- NSS_Shutdown(); >+ if (initialized) >+ NSS_Shutdown(); >+ if (nss_initlock) { >+ PR_DestroyLock(nss_initlock); >+ nss_initlock = NULL; >+ } > initialized = 0; > } > >@@ -805,7 +815,8 @@ > curlerr = CURLE_SSL_CONNECT_ERROR; > > /* FIXME. NSS doesn't support multiple databases open at the same time. */ >- if(!initialized) { >+ PR_Lock(nss_initlock); >+ if(!initialized && !NSS_IsInitialized()) { > initialized = 1; > > certDir = getenv("SSL_DIR"); /* Look in $SSL_DIR */ >@@ -829,8 +840,11 @@ > if(rv != SECSuccess) { > infof(conn->data, "Unable to initialize NSS database\n"); > curlerr = CURLE_SSL_CACERT_BADFILE; >+ PR_Unlock(nss_initlock); >+ initialized = 0; > goto error; > } >+ PR_Unlock(nss_initlock); > > NSS_SetDomesticPolicy(); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 459297
:
315638
|
315685