Peter Kokot [Thu, 28 Feb 2019 21:07:16 +0000 (22:07 +0100)]
Fix file permissions
Git can track executable (0755) and non-executable (0644) file modes.
This patch fixes file permissions in the php-src repository according to
the predefined executable files with 0755 permissions (shell scripts)
and all others with 0644 permissions.
`_php_image_output()` is only ever called for `PHP_GDIMG_CONVERT_WBM`,
`PHP_GDIMG_TYPE_GD` and `PHP_GDIMG_TYPE_GD2`. All other image types
solely use the more flexible `_php_image_output_ctx()`.
Nikita Popov [Thu, 28 Feb 2019 11:51:19 +0000 (12:51 +0100)]
Remove mysqli embedded server support
This code is not compatible with PHP 7.0. The fact that nobody
complained that the mysqli embedded server functionality doesn't
build anymore seems like a strong signal that we can drop it...
Anatol Belski [Thu, 28 Feb 2019 11:48:47 +0000 (12:48 +0100)]
Sync with behavior change in OpenSSL 1.1.1b
A behavior change in revealed by some openssl_decrypt() based test,
where an encrypt API is used with a decrypt context. The EVP_Cipher*
functions will automatically choose the right operation depending on the
context passed.
Peter Kokot [Sat, 23 Feb 2019 22:39:21 +0000 (23:39 +0100)]
Remove unused PHP_AC_BROKEN_SNPRINTF m4 macro
The snprintf function is part of the C99 standard and newer systems in
most cases all support it as defined in the standard. However, some old
Windows and HP-UX systems the function behaves differently. These checks
were also removed and PHP now uses a replacement for the snprintf
function. With gradual transition to C99 usage as a minimum requirement,
it will also be able to be replaced to system's snprintf function
directly.
Additionally in this context the unused HAVE_VSNPRINTF and check for
vsnprintf have been removed. PHP uses its own vsnprintf implementation
for now until more reliable C99 compliant function can be used from the
C libraries.
Peter Kokot [Sat, 23 Feb 2019 23:35:36 +0000 (00:35 +0100)]
Remove deprecated PHP_EXTENSION m4 macro
The PHP_EXTENSION macro was used before the introduction of the updated
build system in the 9d9d39a0de3bec962c343051011f5a2ed7d7b242. The
extensions at that time possibly still used the Makefile.in and Automake
and the PHP_EXTENSION macro has been replaced with the PHP_NEW_EXTENSION
macro.
Today, the once deprecated macro can be removed in favor of only
PHP_NEW_EXTENSION macro.
This patch removes the checks to make a custom sprintf function
The ZEND_BROKEN_SPRINTF has been removed and the
hardcoded #define zend_sprintf sprintf is used.
The php_sprintf and zend_sprintf are now symbols to sprintf.
This patch now removes the custom PHP definitions of the php_sprintf and
zend_sprintf functions in favor of the C99 sprintf which is also
standardized in C89 already. Once, on some systems sprintf didn't behave
in same way.
Peter Kokot [Thu, 21 Feb 2019 21:46:41 +0000 (22:46 +0100)]
Replace Hebrew characters with escape sequences
calendar.c includes ISO-8859-8 encoded Hebrew characters, which may
cause compile errors, and is causing issues when saving file as UTF-8.
This patch replaces characters with appropriate escape sequences.
Nikita Popov [Fri, 22 Feb 2019 14:42:37 +0000 (15:42 +0100)]
Fix anon class handling in ext mode
Opcode order changes in 7.4 and the EXT_STMT is now declare the
DECLARE_ANON. Fix this by returning the opline from compile_class_decl
to avoid any fragile opcode searching.
Nikita Popov [Thu, 21 Feb 2019 15:59:30 +0000 (16:59 +0100)]
Stricter validation for popen mode argument on Windows
Context: The ext/standard/tests/file/popen_pclose_error-win32.phpt
test often fails under parallel testing, because the "is not recognized
as an internal or external command" message doesn't actually have a
guaranteed position in the output.
While looking into this, I noticed that this test on Windows tests
something very different (invalid comand) than on Linux (invalid mode).
Here I'm adjusting the Windows popen implementation so it immediately
fails on a `rw` mode, just like it does on Linux.
Joe Watkins [Thu, 21 Feb 2019 22:54:26 +0000 (23:54 +0100)]
While the compiler does not have the FBC set for zend_get_call_op, optimizer does, and so incorrectly results in ignoring these flags.
If someone has a better patch, please merge it ASAP, this appears to be correct as I and Nikita originally thought.
Revert "Revert "zend_get_call_op ignoring compiler flags zend_get_call_op will ignore ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USER_FUNCTIONS, breaking the intention of these flags""
Joe Watkins [Thu, 21 Feb 2019 21:40:02 +0000 (22:40 +0100)]
Revert "zend_get_call_op ignoring compiler flags zend_get_call_op will ignore ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USER_FUNCTIONS, breaking the intention of these flags"
Peter Kokot [Wed, 20 Feb 2019 20:08:56 +0000 (21:08 +0100)]
Remove unused PDO_MYSQL_LIB_CHK m4 macro
This was once used by the ext/mysql extension named as MYSQL_LIB_CHK.
The call got removed via fd1578c196575c7e120a84ee030bb87c14a199b0. In
PDO this is not called anymore and can be removed.
Nikita Popov [Thu, 21 Feb 2019 14:49:37 +0000 (15:49 +0100)]
Remove use of file resources from string function tests
These tests are pointless (they don't even have anything to do
with resources, they just use get_resource_type() as a peculiar way
to create a string), and cause unnecessary IO dependency.
Nikita Popov [Thu, 21 Feb 2019 14:29:22 +0000 (15:29 +0100)]
Make (v)fprintf tests more robust
By using a separate file for each test. Also drop some unnecessary
SKIPIF checks for file creation. We assume that files can be created in
the test directories all over the place, so don't check for it here.
Nikita Popov [Thu, 21 Feb 2019 12:42:47 +0000 (13:42 +0100)]
Fixed bug #77597
The same variable was reused in two nested loops... The test doesn't
fail on 7.2, but I'm fixing this here anyway as the code is clearly
wrong, and probably erroneous in other situations.
Nikita Popov [Thu, 21 Feb 2019 11:04:49 +0000 (12:04 +0100)]
Fix issue mentioned in #77302
Apparently Serializable::serialize() can return NULL, which is encoded
as N;. As we do not allow back-references to non-object values in
PHP 7.3 we need to make sure that any references are also compiled to
N;.
Joe Watkins [Thu, 21 Feb 2019 07:53:28 +0000 (08:53 +0100)]
zend_get_call_op ignoring compiler flags zend_get_call_op will ignore ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USER_FUNCTIONS, breaking the intention of these flags
Nikita Popov [Thu, 21 Feb 2019 08:35:30 +0000 (09:35 +0100)]
Add special "all" conflict
If a test conflicts with "all", then no other tests may be run in
parallel. This is needed for windows_mb_path tests, which rely on
the console codepage, which is shared across all parallel workers.
Also add support for comments in the CONFLICTS section/file.