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

 ID:               51424
 Updated by:       srina...@php.net
 Reported by:      laacz at laacz dot lv
 Summary:          crypt() function hangs after 3rd call
 Status:           Assigned
 Type:             Bug
 Package:          Strings related
 Operating System: *
 PHP Version:      5.3.2
 Assigned To:      pajoye

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2010-06-16 16:30:30] paj...@php.net

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] srina...@php.net

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;

        }

------------------------------------------------------------------------
[2010-06-15 15:43:34] paj...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=300466
Log: - #51424, silent warnings on win

------------------------------------------------------------------------
[2010-06-15 11:26:24] paj...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=300460
Log: - Fix #51424, crypt() function hangs after 3rd call

------------------------------------------------------------------------
[2010-06-15 11:26:10] paj...@php.net

Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=300459
Log: - Fix #51424, crypt() function hangs after 3rd call

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


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