php-src/ext
Alex Dowad 7a9f0cc3d0 Simplify _crypt_extended_init_r, and fix redundant initialization on Win32/Solaris
Looking at the history of this function, the original implementation had a bug where
it would return from the middle of the function without unlocking the mutex first.
The author attempted to fix this by incrementing the `initialized` flag atomically,
which is not necessary, since the section which modifies the flag is protected by a
mutex.

Coincidentally, at the same time that all this unnecessary 'atomic' machinery was
introduced, the code was also changed so that it didn't return without unlocking the
mutex. So it looks like the bug was fixed by accident.

It's not necessary to declare the flag as `volatile` either, since it is protected
by a mutex.

Further, the 'fixed' implementation was also wrong in another respect: on Windows
and Solaris, the `initialized` flag was not even declared as `static`!! So the
initialization of the static tables for S-boxes, P-boxes, etc. was repeated on
each call to `php_crypt`, completely defeating the purpose of this function.
2020-06-23 16:10:54 +02:00
..
bcmath make bcpowmod stricter by not returning false, instead throw exception 2020-06-22 09:31:55 +02:00
bz2 Fix [-Wundef] warning in BZip2 extension 2020-05-16 15:31:12 +02:00
calendar Convert UNKNOWN default values to null in ext/calendar 2020-05-02 11:05:27 +02:00
com_dotnet Constify char * arguments of APIs 2020-06-08 10:38:45 +02:00
ctype Fix [-Wundef] warning in CType extension 2020-05-16 15:31:13 +02:00
curl Also allow casting CurlMultiHandles 2020-06-22 15:09:22 +02:00
date Merge branch 'PHP-7.4' 2020-06-18 10:09:58 +02:00
dba Fix missing initializers in dba inifile 2020-06-23 12:41:10 +02:00
dom Add ZVAL_OBJ_COPY macro 2020-06-17 16:36:56 +02:00
enchant Call zpp in enchant_broker_*_dict_path with libenchant-2 2020-06-18 17:10:22 +02:00
exif Merge branch 'PHP-7.4' 2020-06-13 18:33:17 +02:00
ffi Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0) 2020-06-16 18:39:09 +02:00
fileinfo Merge branch 'PHP-7.4' 2020-06-10 16:40:39 +02:00
filter Constify char * arguments of APIs 2020-06-08 10:38:45 +02:00
ftp Merge branch 'PHP-7.4' 2020-06-23 16:02:19 +02:00
gd Return void from php_jpeg_emit_message() 2020-06-19 16:59:29 +02:00
gettext Fix [-Wundef] warning in GetText extension 2020-05-16 15:31:17 +02:00
gmp Fix warning of strict-prototypes 2020-06-07 10:36:50 +02:00
hash Correct implementation of joaat hash. 2020-06-22 09:39:29 +02:00
iconv Remove depreacted curly brace offset syntax 2020-05-22 16:52:17 +02:00
imap Fix [-Wundef] warning in IMAP extension 2020-05-16 15:31:18 +02:00
intl Add ZVAL_OBJ_COPY macro 2020-06-17 16:36:56 +02:00
json Constify char * arguments of APIs 2020-06-08 10:38:45 +02:00
ldap Fix [-Wundef] warnings in LDAP extension 2020-05-18 00:37:15 +02:00
libxml Control VCRT leak reporting via environment variable in debug builds 2020-06-10 09:05:17 +02:00
mbstring Merge branch 'PHP-7.4' 2020-06-17 09:35:19 +02:00
mysqli Fix some UNKNOWN default values 2020-06-09 09:46:51 +02:00
mysqlnd Add helper APIs for maybe-interned string creation 2020-06-08 15:31:52 +02:00
oci8 Made sure zpp is always called and refactored some existing zpp calls. 2020-06-16 10:45:14 +02:00
odbc Merge branch 'PHP-7.4' 2020-05-27 11:27:34 +03:00
opcache Improve JIT for SEPARATE_ARRAY 2020-06-23 13:46:56 +03:00
openssl Merge branch 'PHP-7.4' 2020-06-19 09:44:56 +02:00
pcntl Fix some UNKNOWN default values 2020-06-09 09:46:51 +02:00
pcre Use ZPP callable check for preg_replace_callback() $callback argument 2020-06-22 15:56:36 +02:00
pdo Add ZVAL_OBJ_COPY macro 2020-06-17 16:36:56 +02:00
pdo_dblib Fix [-Wundef] warning in PDO DBLib extension 2020-05-20 16:29:52 +02:00
pdo_firebird Fix [-Wundef] warning in PDO Firebird extension 2020-05-20 16:29:52 +02:00
pdo_mysql Fix [-Wundef] warning in PDO MySQL extension 2020-05-20 16:29:52 +02:00
pdo_oci Fix [-Wundef] warning in PDO OCI extension 2020-05-20 16:29:53 +02:00
pdo_odbc Fix MSVC level 1 (severe) warnings 2020-06-05 11:17:05 +02:00
pdo_pgsql Clean up calls to extension_loaded('json') in tests 2020-05-28 15:07:47 -04:00
pdo_sqlite Merge branch 'PHP-7.4' 2020-06-03 10:17:27 +02:00
pgsql PGSQL and POD_SQL: don't include pg_config.h 2020-05-25 10:48:35 +02:00
phar Add ZVAL_OBJ_COPY macro 2020-06-17 16:36:56 +02:00
posix Merge branch 'PHP-7.4' 2020-06-19 17:32:34 +02:00
pspell Fix [-Wundef] warning in PSpell extension 2020-05-20 14:01:11 +02:00
readline Fix UNKNOWN default values in ext/readline 2020-06-23 12:52:12 +02:00
reflection Add ZVAL_OBJ_COPY macro 2020-06-17 16:36:56 +02:00
session Fix a couple of UNKNOWN default values in ext/session 2020-06-23 15:42:59 +02:00
shmop Fix [-Wundef] warning in SHMOP extension 2020-05-20 14:01:10 +02:00
simplexml Fix #63575: Root elements are not properly cloned 2020-06-17 16:48:50 +02:00
skeleton Store default parameter values of internal functions in arg info 2020-04-08 18:37:51 +02:00
snmp Fix MSVC level 1 (severe) warnings 2020-06-05 11:17:05 +02:00
soap Add ZVAL_OBJ_COPY macro 2020-06-17 16:36:56 +02:00
sockets Suppress deprecation warning in sockets.c 2020-06-12 12:35:02 +02:00
sodium Add -Wno-type-limits compiler flag to Sodium extension 2020-04-14 22:22:33 +02:00
spl Merge branch 'PHP-7.4' 2020-06-21 22:55:00 +02:00
sqlite3 Add ZVAL_OBJ_COPY macro 2020-06-17 16:36:56 +02:00
standard Simplify _crypt_extended_init_r, and fix redundant initialization on Win32/Solaris 2020-06-23 16:10:54 +02:00
sysvmsg Fix [-Wundef] warning in Sysvmsg extension 2020-05-18 00:37:17 +02:00
sysvsem Convert resource to object in Sysvshm extension 2020-06-16 16:36:11 +02:00
sysvshm Convert resource to object in Sysvshm extension 2020-06-16 16:36:11 +02:00
tidy Fix [-Wundef] warning in Tidy extension 2020-05-18 00:37:18 +02:00
tokenizer Add helper APIs for maybe-interned string creation 2020-06-08 15:31:52 +02:00
xml Add ZVAL_OBJ_COPY macro 2020-06-17 16:36:56 +02:00
xmlreader Fix [-Wundef] warning in XMLReader extension 2020-05-20 16:29:51 +02:00
xmlwriter FR #79344: xmlwriter_write_attribute_ns: $prefix should be nullable 2020-06-16 15:50:01 +02:00
xsl Fix [-Wundef] warning in XLS extension 2020-05-20 16:29:51 +02:00
zend_test Fix MSVC level 1 (severe) warnings 2020-06-05 11:17:05 +02:00
zip Merge branch 'PHP-7.4' 2020-06-18 17:14:03 +02:00
zlib Convert resources to objects in ext/zlib 2020-06-17 16:50:00 +02:00
ext_skel.php Repair ext_skel.php to create the basic framework for a PHP extension 2020-03-23 09:25:06 +01:00