Edit report at http://bugs.php.net/bug.php?id=51424&edit=1

 ID:                 51424
 Updated by:         [email protected]
 Reported by:        laacz at laacz dot lv
 Summary:            crypt() function hangs after 3rd call
-Status:             Assigned
+Status:             Closed
 Type:               Bug
 Package:            Strings related
 Operating System:   *
 PHP Version:        5.3.2
 Assigned To:        pajoye
 Block user comment: N



Previous Comments:
------------------------------------------------------------------------
[2010-06-17 12:22:53] [email protected]

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=300512
Log: - #51424

------------------------------------------------------------------------
[2010-06-17 12:22:06] [email protected]

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=300511
Log: - #51424, solaris part

------------------------------------------------------------------------
[2010-06-17 01:01:18] [email protected]

i have attached a patch to add membar functionality for solaris. af
course, this would be more relevant if we want to remove the tsrm lock
around this.

------------------------------------------------------------------------
[2010-06-16 16:30:30] [email protected]

This patch was what I proposed initially, it only reduces the risk but
does not fix all cases.



What I committed is over safe as we could remove the tsrm lock. However
I do need to know how we can do the membar on solaris.

------------------------------------------------------------------------
[2010-06-16 15:04:02] [email protected]

hi  laacz at laacz dot lv

 can u please try with this patch and see if this addresses u r issue



to apply this patch, u will need to save the below contents into a file
and 

run



cd php-5.3.2

patch -d . < <saved-file-name>



gmake clean

gmake



 

--- ext/standard/php_crypt_r.c.orig     Wed Jun 16 05:59:16 2010

+++ ext/standard/php_crypt_r.c  Wed Jun 16 06:00:17 2010

@@ -81,9 +81,7 @@

        tsrm_mutex_lock(php_crypt_extended_init_lock);

 #endif

 

-       if (initialized) {

-               return;

-       } else {

+       if (!initialized) {

                _crypt_extended_init();

                initialized = 1;

        }

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=51424


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51424&edit=1

Reply via email to