Preloading: Don't move conditional functions to back to scripts
Conditional function declaration may be referenced by functions or
classes that have been preloaded, so we should not move them back
to scripts.
What we probably should be doing though is to discard conditional
functions that are not used in the optimizer. This is probably
reasonably common for polyfills, where we will be able to const-eval
the conditions and drop the BBs declaring the functions, but won't
delete the function declarations themselves.
LITERAL_VALUE with related literals cannot be merged, avoid inserting
them in the literals hash in the first place. Otherwise we may end up
inserting the same key multiple times. We may also miss merging
opportunities due to the duplicate keys.
Check whether there is a parent/interface/trait method with the same
name and only then require the type to be known. This reduces the
number of cases where this triggers in practice a lot.
The output of the three handles may be interleaved. We already have
curl_basic_018.phpt which uses curl_multi_getcontent() and thus
has predictable output. As such, I'm dropping this test altogether.
Fix #78241: touch() does not handle dates after 2038 in PHP 64-bit
`time_t` defaults to `_time64` (which is 64bit signed) even on x86, but
`Int32x32To64()` truncates it to signed 32bit. We replace the macro
with the "manual" calculation.
Pieter Hordijk [Wed, 15 May 2019 14:13:34 +0000 (17:13 +0300)]
Removed mysqlnd stats from phpinfo page
All information can already be retrieved using the APIs at https://www.php.net/manual/en/mysqlnd.stats.php. Closes https://bugs.php.net/bug.php?id=60594
Peter Kokot [Tue, 2 Jul 2019 20:29:54 +0000 (22:29 +0200)]
Enable option checking on CI
This adds the Autoconf's --enable-option-checking=fatal option so
when non existing option from the PHP's configure options is used
a fatal error happens.
Peter Kokot [Tue, 2 Jul 2019 20:15:24 +0000 (22:15 +0200)]
Remove PHP_CHECK_CONFIGURE_OPTIONS
Instead of building a custom macro for checking configure options,
Autoconf 2.62+ already outputs a warning at the beginning and the end
of the output of configure script. It automatically detects correct
and wrong options better.
This is related also to bug #55634.
So now instead a better way is the default Autoconf approach:
This outputs a warning at the beginning and end of the configure output:
./configure --with-non-existing
This results in fatal error:
./configure --non-existing
configure: error: unrecognized option: `--non-existing'
Try `./configure --help' for more information
The `--enable-option-checking=fatal` results in fatal error for all non
existing options:
This uses a separate job template, because msan requires all used
libraries (apart from glibc) to be instrumented, so we can't link
any external libraries unless we recompile them. As such, we need
a much more minimal configure.
This test is easily tripped by former test runs with other PHP
versions. To avoid such false positives, we check that there is at
least one respective OPcache file, and that all found OPcache user ID
folders have exactly 32 hexadecimal digits.
Peter Kokot [Mon, 1 Jul 2019 11:20:35 +0000 (13:20 +0200)]
Remove not needed checks for functions
The following functions don't need to be checked anymore since the
they are not used across the code or the symbols aren't used anymore:
- cuserid (not used)
- lrand48 (not used and removed via 6d6ef7aacc7f9b17709d2f93b70b359c75011f89)
- random (check is not used)
- srand48 (not used)
- srandom (not used)
- strdup (check is not used)
and the unused check symbols:
- HAVE_CUSERID
- HAVE_LRAND48
- HAVE_RANDOM
- HAVE_SRAND48
- HAVE_SRANDOM
- HAVE_STRDUP
Peter Kokot [Mon, 1 Jul 2019 11:13:51 +0000 (13:13 +0200)]
Remove unused check for struct cmsghdr
The result of this check is to whether to define the HAVE_CMSGHDR symbol
or not. The HAVE_CMSGHDR is never used in the code and it has been
removed via 90289924c031c5b0b2aa1f99ecf317640c926a62.
It would be great if this were fully initialized, but it's not
really a problem either (as long as we don't care about reproducible
file cache), so ignore this for now.
This has been sporadically failing on macos for a while. We've tried
a couple of things (using int arithmetic, normalizing to gettimeofday),
but this issue remains. I'm adding some tolerance to the test to
avoid CI failures.
Peter Kokot [Fri, 28 Jun 2019 21:10:37 +0000 (23:10 +0200)]
Sync functions checks
Removed unused checks:
- mbsinit check removed, HAVE_MBSINIT removed (not used in php-src)
- mempcpy check removed, HAVE_MEMPCPY removed (not used in php-src anymore since 560ed89bfbb56526251e9bd2fbcb27e5932641d8 which uses PHP's own implementation)
- strpncpy check removed, added via a8c9e893b6911c785f698d724b2ff61e7aebb737 and
not used.
- setpgid check removed since HAVE_SETPGID is not used
Moved to a central configure.ac:
- fpclass
- mbrlen moved to configure.ac (since the HAVE_MBRLEN is used accross the php-src)
- sigprocmask
- getcwd
- getwd
- glob
- strfmon
- nice
Peter Kokot [Wed, 26 Jun 2019 19:55:26 +0000 (21:55 +0200)]
Remove unused build specific symbols
These were part of the following decomissioned extensions:
- PHP_SYBASE part of the sybase extension
- PHP_MSQL_* part of the msql extension
- PHP_APACHE_* symbols were used in apache and apache_hooks sapis
- PHP_FHTTPD_* symbols part of old sapi/fhttpd
- PHP_MYSQL_* symbols were part of the legacy mysql extension