1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Commit Graph

112085 Commits

Author SHA1 Message Date
Nikita Popov 080e2316cf Mark some operand fetching funs as ATTRIBUTE_UNUSED
Whether these are used depends on VM specialization.
2019-06-12 13:17:25 +02:00
Nikita Popov 16f79129c7 Fix unused variables in fpm_env.c 2019-06-12 13:17:25 +02:00
Nikita Popov 93c728b77c Try to control ZEND_MM_ALIGNED_SIZE type 2019-06-12 13:17:25 +02:00
Nikita Popov be36d92294 Fix unused value warnings in snprintf.c 2019-06-12 13:17:25 +02:00
Nikita Popov 52d80ccd24 Remove MYSQLND_LLU_SPEC/MYSQLND_LL_SPEC
No longer used, replaced by PRIu64/PRIi64.
2019-06-12 13:17:25 +02:00
Nikita Popov e1e275eefd Fix mysqlnd printf modifiers
By moving the the standard macros...
2019-06-12 13:17:25 +02:00
Nikita Popov 4d65d53805 Enable -Werror on m32 build
This one is clean now.
2019-06-12 13:17:25 +02:00
Nikita Popov 3e4b9659d3 Fix warnings in mysqlnd_alloc.c
And also separate the PHP_DEBUG codepaths more, to avoids having an
ifdef every other line...
2019-06-12 13:17:25 +02:00
Nikita Popov 9fa552f393 Fix incorrect enum value uses in xmlrpc 2019-06-12 13:17:25 +02:00
Nikita Popov fdfb390f07 Remove unused php_mbX_int_to_char() functions 2019-06-12 13:17:25 +02:00
Nikita Popov 5be772a19c Fix incorrect printf modifiers 2019-06-12 13:17:25 +02:00
Nikita Popov 2134cc25d2 Guard functions by SO_PASSCRED 2019-06-12 13:17:25 +02:00
Christoph M. Becker 37d0c7b0e4 Simplify GD null byte injection tests
These tests actually check that no file with a name containing a NUL is
created by the GD image output functions.  This is superfluous, since
it is sufficient to check that the function failed, and that an
appropriate warning has been raised.

We also add missing nullbyte injection tests.
2019-06-12 12:04:01 +02:00
Nikita Popov 2f1d822d78 Preserve CFLAGS/LDFLAGS for curl ssl check
We need to add the curl-specific flags, but we also need to preserve
the general flags, to keep around important stuff like -m32.
2019-06-12 11:54:13 +02:00
Nikita Popov 365a905e00 Suppress int to char conversion warnings 2019-06-12 11:54:13 +02:00
Nikita Popov d2921af348 Use labs() on long integer 2019-06-12 11:54:13 +02:00
Nikita Popov 1d8c323b64 Don't use sqlite3_aggregate_count()
This function has been deprecated, with the recommendation that
the count should be explicitly tracked in the aggregate context,
if it is needed.
2019-06-12 11:54:12 +02:00
Nikita Popov 26a1b2e28e Fix type mismatch in two get_col callbacks 2019-06-12 11:54:12 +02:00
Nikita Popov f601eb15e6 Fix -Wmissing-braces warnings
Unfortunate that = {} is a GNU extension.
2019-06-12 11:54:12 +02:00
Derick Rethans 06ddc025ac Update credits pre-release 2019-06-12 08:58:11 +01:00
Joe Watkins e2eb1ee1e3 fix flaky zip tests, order is OS dependent 2019-06-12 09:47:47 +02:00
Remi Collet 66bd7875f8 add comment about pg_config/pkgconfig 2019-06-12 09:39:11 +02:00
Nikita Popov b654a07492 Revert option rename
Let's keep this at --with-password-argon2 to avoid churn, I don't
think we have a strong motivation to rename this one.
2019-06-12 09:28:25 +02:00
Nikita Popov 852ab5d83f Use %define api.pure instead of %pure-parser
%pure-parser is deprecated. In our case there is no difference between
true & full, as we don't use locations.
2019-06-12 09:26:34 +02:00
Joe Watkins c54a247cb0 fix flaky sockets test - form of response is OS dependent 2019-06-12 08:47:35 +02:00
Joe Watkins abe38b5e48 fix flaky test on OSX 2019-06-12 08:33:07 +02:00
Joe Watkins eac238fb6c Revert "ext/pgsql: Use PKG_CHECK_MODULES to detect the pq library"
This reverts commit 1e265174ed.
2019-06-12 08:00:55 +02:00
Joe Watkins 2dfa495311 fix flaky gd tests 2019-06-12 07:52:28 +02:00
Joe Watkins 8ab3e7bc0c disable phpdbg on macosx, it's not well tested there and is skewing results [ci skip] 2019-06-12 06:58:53 +02:00
Hugh McMaster bdcef51bcb ext/standard: Use PKG_CHECK_MODULES to detect the Argon2 library 2019-06-12 06:54:54 +02:00
Hugh McMaster 9d61036651 ext/ldap: Use PKG_CHECK_MODULES to detect the libsasl2 library 2019-06-11 17:11:53 +02:00
Nikita Popov fa5513aefe Remove unused gmp_unary_ui_op() function 2019-06-11 17:01:29 +02:00
Nikita Popov e5411e17c7 Remove unused _setEdgePixel() and getPixelOverflowColorTC() functions 2019-06-11 16:59:12 +02:00
Nikita Popov 5c844c1d36 Fix fabs warning in gd_interpolation.c
Matches upstream code.
2019-06-11 16:57:24 +02:00
Nikita Popov 2290102172 Remove safeboolean use in gd_jpeg.c
This is a backport of
https://github.com/libgd/libgd/blob/e5502c7a3f1fe60536ec060f0211d97066c006ea/src/gd_jpeg.c.
2019-06-11 16:54:45 +02:00
Nikita Popov 0849a621fd Fix abs(long) warnings in gd.c
I'm fixing this using (int) casts instead of labs() because this is
what upstream GD does.
2019-06-11 16:50:25 +02:00
Nikita Popov fc65da5c59 Fix 32-bit warnings in timelib
This has already been fixed upstream in
https://github.com/derickr/timelib/commit/4df262e7585b2ad2c6b01a23190974f9aea298ed
so I'm backporting this change.
2019-06-11 16:14:10 +02:00
George Peter Banyard 7f5f277cf2 Remove unnecessary short_open_tag INI directive in tests
Closes GH-4249.
2019-06-11 16:14:10 +02:00
Nikita Popov e5aba0f518 Build with ldap and ldap sasl on azure
We don't set up an ldap server, so this is mainly about testing
that the build works.
2019-06-11 15:48:40 +02:00
Nikita Popov 8d3a2a4a12 Remove ext/ldap/tests/bug76248.phpt
I wasn't able to make this test work reliably in CI, and the thing
it's testing does not seem worth spending more time on it.
2019-06-11 15:47:01 +02:00
Nikita Popov 83e0bfb50c Merge branch 'PHP-7.3' into PHP-7.4 2019-06-11 15:41:05 +02:00
Tyson Andre 5d3e3a62a2 Be more precise about possible types for mysqli methods
mysqli has an uncommon approach to 64-bit compatibility:
it will convert numbers that can't be represented on 32-bit
platforms to a string.
This is documented at
https://www.php.net/manual/en/mysqli-stmt.affected-rows.php#refsect1-mysqli-stmt.affected-rows-returnvalues

So if there's a query to a remote mysqli server that affects
more than 2.2 billion rows, then the opcache inference might be
incorrect.

(It's possible to add a MAY_BE_STRING_ON_32_BIT_PLATFORM bitflag macro to
account for this, but I don't think there's a need or want to?)

Patches 3162285b86

This is based on the list of php 7.4 functions using
MYSQLI_RETURN_LONG_INT in mysqli_api.c
2019-06-11 15:40:33 +02:00
Tyson Andre 07c63c6fdf Fix opcache signatures for mysqli_stat
See mysqli_api.c and https://www.php.net/manual/en/mysqli.stat.php
2019-06-11 15:39:59 +02:00
Tyson Andre 7350e808c5 Fix bug in opcache flags for mysqli_get_charset
https://www.php.net/manual/en/mysqli.get-charset.php
tests/mysqli_field_seek.phpt has a test of this returning an object.

Looking at the source in ext/mysqli/mysqli_nonapi.c,
this should be object|null, not array|null

This might actually cause bugs in opcache's inferences,
(no proof of this)
so it might make sense to pull this patch into an earlier minor version.
2019-06-11 15:39:59 +02:00
Joe Watkins 0cfa2e51d4 Merge branch 'PHP-7.4' of git://github.com/php/php-src into PHP-7.4 2019-06-11 15:16:16 +02:00
Joe Watkins 69190ce5c0 This reverts 0e5d4ea555 to fix the build on MacOSX
On Mac thread_local and __thread are not ABI compatible, in addition, thread_local
comes with additional overhead, __thread seems to be the most suitable linkage to use
regardless of c++/c
2019-06-11 15:13:27 +02:00
Christoph M. Becker fc9d452a17 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Next is 7.3.8
2019-06-11 13:32:14 +02:00
Christoph M. Becker bcf20963c1 Next is 7.3.8 2019-06-11 13:31:30 +02:00
Nikita Popov 8f8fcbbd39 Support full variance if autoloading is used
Keep track of delayed variance obligations and check them after
linking a class is otherwise finished. Obligations may either be
unresolved method compatibility (because the necessecary classes
aren't available yet) or open parent/interface dependencies. The
latter occur because we allow the use of not fully linked classes
as parents/interfaces now.

An important aspect of the implementation is we do not require
classes involved in variance checks to be fully linked in order for
the class to be fully linked. Because the involved types do have to
exist in the class table (as partially linked classes) and we do
check these for correct variance, we have the guarantee that either
those classes will successfully link lateron or generate an error,
but there is no way to actually use them until that point and as
such no possibility of violating the variance contract. This is
important because it ensures that a class declaration always either
errors or will produce an immediately usable class afterwards --
there are no cases where the finalization of the class declaration
has to be delayed until a later time, as earlier variants of this
patch did.

Because variance checks deal with classes in various stages of
linking, we need to use a special instanceof implementation that
supports this, and also introduce finer-grained flags that tell us
which parts have been linked already and which haven't.

Class autoloading for variance checks is delayed into a separate
stage after the class is otherwise linked and before delayed
variance obligations are processed. This separation is needed to
handle cases like A extends B extends C, where B is the autoload
root, but C is required to check variance. This could end up
loading C while the class structure of B is in an inconsistent
state.
2019-06-11 13:09:33 +02:00
Nikita Popov 89b2d88659 Register class before fetching parent
We want the class declaration to be available while compiling the
parent class.
2019-06-11 13:09:33 +02:00