svn: /php/php-src/trunk/ext/standard/ php_crypt_r.c var_unserializer.c
| From: | Pierre Joye | Date: | Tue, 15 Jun 2010 09:26:22 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/standard/ php_crypt_r.c var_unserializer.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-62888@lists.php.net to get a copy of this message | ||
pajoye Tue, 15 Jun 2010 09:26:22 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=300460
Log:
- Fix #51424, crypt() function hangs after 3rd call
Bug: http://bugs.php.net/51424 (Assigned) crypt() function
hangs after 3rd call
Changed paths:
U php/php-src/trunk/ext/standard/php_crypt_r.c
U php/php-src/trunk/ext/standard/var_unserializer.c
Modified: php/php-src/trunk/ext/standard/php_crypt_r.c
===================================================================
--- php/php-src/trunk/ext/standard/php_crypt_r.c 2010-06-15 09:26:06 UTC (rev 300459)
+++ php/php-src/trunk/ext/standard/php_crypt_r.c 2010-06-15 09:26:22 UTC (rev 300460)
@@ -81,11 +81,13 @@
tsrm_mutex_lock(php_crypt_extended_init_lock);
#endif
- if (initialized) {
- return;
- } else {
+ if (!initialized) {
+#ifdef PHP_WIN32
+ InterlockedIncrement(initialized);
+#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2))
+ __sync_fetch_and_add(&initialized, 1);
+#endif
_crypt_extended_init();
- initialized = 1;
}
#ifdef ZTS
tsrm_mutex_unlock(php_crypt_extended_init_lock);
Modified: php/php-src/trunk/ext/standard/var_unserializer.c
===================================================================
--- php/php-src/trunk/ext/standard/var_unserializer.c 2010-06-15 09:26:06 UTC (rev 300459)
+++ php/php-src/trunk/ext/standard/var_unserializer.c 2010-06-15 09:26:22 UTC (rev 300460)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Wed May 26 09:11:18 2010 */
+/* Generated by re2c 0.13.5 on Mon Jun 14 12:03:55 2010 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+