Fix #76510: file_exists() stopped working for phar://
We work around a strlen() optimization bug in GCC 8[1] by checking
whether the used GCC exhibits the broken behavior, and if so by
disabling `optimize-strlen`.
* master:
7.0.33 next
Sync NEWS [ci skip]
add NEWS for 76582
Enforce ordering of property compare in object comparisons
Fixed wrong assertion
Skip test on unsuitable env
* master:
Update NEWS
Fix for bug #76582
Fix ssl stream reneg limit test to print only after first renegotiation
Make a copy unconditionally
Fix memory leak in pcre cache
Remove not needed checking for <errno.h>
Remove HAVE_ASSERT_H
Add test for bug #76850
Fixed bug #76850 Exit code mangled by set locale/preg_match
Remove empty PHP tags from test
Fix #75273: php_zlib_inflate_filter() may not update bytes_consumed
Fix PCRE2 exclusion and remove dead libs in Makefile.gcov
Report mem leaks to stderr if no Win debugger is present
Use combined assignment contanation operator
Fixed bug #76796
Support fixed address mmap without replacement
Peter Kokot [Wed, 5 Sep 2018 19:34:40 +0000 (21:34 +0200)]
Remove not needed checking for <errno.h>
Header `<errno.h>` is part of the standard C89 headers [1] and on
current systems checking is not need anymore since PHP requires at
least C89. This is noted also by Autoconf itself in the docs and
code [2].
The Autoconf check defined the `HAVE_ERRNO_H` symbol when building PHP
with sockets extension or fpm sapi. This symbol is not utilized across
the PHP source code except in the current version of bundled GD library
which has worked ok so far also with sockets extension or fpm sapi
disabled anyway.
Fix #75273: php_zlib_inflate_filter() may not update bytes_consumed
Whenever we return with `PSFS_PASS_ON`, we need to update
`bytes_consumed` to not mislead the caller. Instead of fixing the
respective `if` clauses, we eschew the early bail-outs to simplify the
code a bit.
Report mem leaks to stderr if no Win debugger is present
Formerly, we sent output regarding memory leaks always to the debugger
on Windows, but this appears to be not useful especially for the PHPTs,
which usually are not run under a debugger, and so important info will
not be available there.
David Carlier [Wed, 29 Aug 2018 20:04:32 +0000 (21:04 +0100)]
Support fixed address mmap without replacement
Reapply changes for Zend fixed mapping but only for FreeBSD.
Other BSD might expose some day a similar flag (private
for OpenBSD for the moment for example).
The Linux's part could be brought back but not before 7.4,
at this time, distributions with kernel > 4.17 will be
more widely available.
Peter Kokot [Wed, 5 Sep 2018 00:53:12 +0000 (02:53 +0200)]
Remove HAVE_STDDEF_H
The `<stddef.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need for a manual check if header is
present.
Since PHP requires at least C89 the `HAVE_STDDEF_H` symbol isn't defined
by Autoconf anywhere else anymore [2] and accross the PHP source code
the header is included unconditionally already.
This patch syncs this also for the bundled libmbfl which is maintaned as
a fork in php-src.
Peter Kokot [Sat, 1 Sep 2018 01:56:52 +0000 (03:56 +0200)]
Remove AC_FUNC_UTIME_NULL
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems, including the AC_FUNC_UTIME_NULL.
This macro checks if `utime(file, NULL)` sets file's timestamp to the
current time and defines the `HAVE_UTIME_NULL` symbol. This check was
relevant on very old systems (for example, 4.3BSD released in 1986) and
today can be omitted for systems with utime since it should be well
supported by now. [2]
Peter Kokot [Mon, 3 Sep 2018 19:35:01 +0000 (21:35 +0200)]
Remove AC_FUNC_MEMCMP
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_FUNC_MEMCMP`.
On some old systems such as SunOS 4.1.3 (EOL in 2003) and NeXT x86
OpenStep (discontinued) the `memcmp` function wasn't present or it
didn't work properly. [2]
On current systems including at least Solaris 10+ this check is not
relevant anymore.
Peter Kokot [Mon, 3 Sep 2018 22:17:21 +0000 (00:17 +0200)]
Remove AC_HEADER_DIRENT
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_DIRENT`.
This macro checks which header defines the `DIR` type. If `<dirent.h>`
is available it defines the `HAVE_DIRENT_H` symbol. Since the `<dirent.h>`
header is already checked in the `configure.ac`, this check is not needed
anymore. This macro also additionally checks for SCO Xenix (discontinued,
latest release 1989) dir and x libraries. [2]
Commit 6ed790685f9ddae11834f36b0ba4fea58afc805a introduced also
`<sys/dir.h>`. This header exists from times of UNIX System V and
provided definition of DIR type on these systems such as 4.3BSD.
Today `<sys/dir.h>` is kept for backwards compatibility and includes
the `<dirent.h>` on current systems. With `dirent.h>` present this
include is no longer required.