]>
granicus.if.org Git - php/log
Nikita Popov [Fri, 12 Apr 2019 14:46:23 +0000 (16:46 +0200)]
Fix strict aliasing violation in phpdbg
By explicitly computing the message length from bytes. This also
makes sure that the length is interpreted in an endianness-independent
manner.
Nikita Popov [Fri, 12 Apr 2019 14:17:35 +0000 (16:17 +0200)]
Don't use php_strtok_r in build_tablename
This is unnecessary convoluted... we just want to find the position
of the dot. Using php_strtok_r requires a copy of the string, and the
implementation also relied on the specific semantics of the scratch
space that strtok_r uses.
Nikita Popov [Fri, 12 Apr 2019 14:03:01 +0000 (16:03 +0200)]
Fix uninit warning in gd.c
This matches the upstream implementation.
Nikita Popov [Fri, 12 Apr 2019 13:54:29 +0000 (15:54 +0200)]
Avoid uninit warning in ftp
Nikita Popov [Fri, 12 Apr 2019 13:10:17 +0000 (15:10 +0200)]
Remove dubious memcmp optimization in iconv
This violates strict aliasing, and appears entirely unnecessary --
the compiler can optimize fixed size memcmp's by itself.
Nikita Popov [Fri, 12 Apr 2019 13:00:55 +0000 (15:00 +0200)]
Avoid uninit warnin in http_fopen_wrapper
This one looks semi-legit, in case php_stream_eof() returns false
but php_stream_get_line() fails. Not totally sure this cannot
happen, so rewriting to check both conditions at once.
Nikita Popov [Fri, 12 Apr 2019 12:56:21 +0000 (14:56 +0200)]
Avoid uninit warning in dtoa
This code is extremely convoluted, I have no idea whether or not
this one is legitimate. Suppressing with explicit initialization.
Nikita Popov [Fri, 12 Apr 2019 12:55:37 +0000 (14:55 +0200)]
Avoid misc uninitialized variable warnings
Nikita Popov [Fri, 12 Apr 2019 12:32:29 +0000 (14:32 +0200)]
Avoid uninitialized variable warnings in gmp
Nikita Popov [Fri, 12 Apr 2019 11:38:51 +0000 (13:38 +0200)]
Add test for get_cfg_var with array variable
And fix incorrect variable shadowing in add_config_entry(). However,
the test doesn't hit this case, as it requires a nested array. I'm
not sure if it's possible to produce nested arrays from ini?
Nikita Popov [Fri, 12 Apr 2019 11:18:23 +0000 (13:18 +0200)]
Avoid unitialized variable warning in soap
Extract envelope fetch into separate function, so the control
flow becomes more obvious.
Christoph M. Becker [Fri, 12 Apr 2019 12:12:08 +0000 (14:12 +0200)]
Include libpq-fs.h on Windows, too
That's more future proof than defining hard-coded macros.
Christoph M. Becker [Fri, 12 Apr 2019 11:08:44 +0000 (13:08 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix tests wrt. internationalization
Christoph M. Becker [Fri, 12 Apr 2019 11:08:13 +0000 (13:08 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fix tests wrt. internationalization
Christoph M. Becker [Fri, 12 Apr 2019 11:05:16 +0000 (13:05 +0200)]
Fix tests wrt. internationalization
Nikita Popov [Fri, 12 Apr 2019 10:47:39 +0000 (12:47 +0200)]
Fix SOAP bailout handling
This code was reusing the _bailout variable from
SOAP_CLIENT_BEGIN/END_CODE(). As _bailout is not volatile, modifying
it after the setjmp call and then reading it back on return is
illegal. Use a separate local bailout variable instead.
This fixes the miscompile introduced by marking zend_bailout() as
noreturn.
Nikita Popov [Fri, 12 Apr 2019 10:09:09 +0000 (12:09 +0200)]
Enable -Wall on release builds for GCC
-Wall was already enabled for debug builds, enable it for release
builds as well.
Nikita Popov [Fri, 12 Apr 2019 10:01:42 +0000 (12:01 +0200)]
Fix unused variable warnings in libmagic
These variables are only used in assertions.
Nikita Popov [Fri, 12 Apr 2019 09:56:37 +0000 (11:56 +0200)]
Remove odd variable assignment in escape_analysis
As we are breaking out of the for loop setting i = ssa_vars_count
doesn't do anything, but it confuses GCC into throwing a no-overflow
assumption warning.
Nikita Popov [Fri, 12 Apr 2019 09:20:29 +0000 (11:20 +0200)]
Fix potentially uninitialized warnings in phpdbg
Nikita Popov [Fri, 12 Apr 2019 09:11:53 +0000 (11:11 +0200)]
Regroup expressions in php_schema.c to avoid array bounds warnings
Nikita Popov [Fri, 12 Apr 2019 09:01:56 +0000 (11:01 +0200)]
Avoid potentially-uninitialized warnings in readline
Nikita Popov [Fri, 12 Apr 2019 08:49:56 +0000 (10:49 +0200)]
Fix uninitializde heredoc_tag use in readline
Could happen if "<<<" is directly followed by a newline.
Nikita Popov [Fri, 12 Apr 2019 08:41:53 +0000 (10:41 +0200)]
Mark zend_bailout() as a noreturn function
Nikita Popov [Fri, 12 Apr 2019 08:37:17 +0000 (10:37 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 12 Apr 2019 08:37:08 +0000 (10:37 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Fri, 12 Apr 2019 08:36:26 +0000 (10:36 +0200)]
Fix key leaks in mb_convert_encoding()
Nikita Popov [Fri, 12 Apr 2019 08:26:11 +0000 (10:26 +0200)]
Use EMPTY_SWITCH_DEFAULT_CASE in php_unicode.c
Avoids a potentially uninitialized variable warning.
Nikita Popov [Fri, 12 Apr 2019 08:05:15 +0000 (10:05 +0200)]
Run compile step under travis_wait
If there are no warnings, we may end up compiling more than 10
minutes without output, in which case the build times out. Use
travis_wait to avoid this.
Nikita Popov [Fri, 12 Apr 2019 07:56:46 +0000 (09:56 +0200)]
Avoid directory clash in realpath tests
Dmitry Stogov [Thu, 11 Apr 2019 23:35:42 +0000 (02:35 +0300)]
Backported call frame initialization improvement
Dmitry Stogov [Thu, 11 Apr 2019 21:49:45 +0000 (00:49 +0300)]
Replace "ZEND_CALL_CTOR" hack by additional live-range
Dmitry Stogov [Thu, 11 Apr 2019 18:37:10 +0000 (21:37 +0300)]
Added test
Christoph M. Becker [Thu, 11 Apr 2019 16:31:17 +0000 (18:31 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix potential OPcache file cache related issues
Christoph M. Becker [Thu, 11 Apr 2019 16:30:27 +0000 (18:30 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fix potential OPcache file cache related issues
Anatol Belski [Thu, 11 Apr 2019 16:17:03 +0000 (18:17 +0200)]
Fix potential OPcache file cache related issues
To solve issues detected during testing, we backport the following
commits to PHP 7.2:
129c5c1181bf344b37e13fd6dc5dfe76c13d7208
9ac133a0b3863ca4d9659140154ee237e5f4669a
ce72bc6b658c335dd37393d0beb28584e6805e97
Nikita Popov [Thu, 11 Apr 2019 15:44:20 +0000 (17:44 +0200)]
Work around -Walloc-size-larger-than bug
Markus Staab [Thu, 11 Apr 2019 13:46:32 +0000 (15:46 +0200)]
Fixed typo
Nikita Popov [Thu, 11 Apr 2019 12:25:40 +0000 (14:25 +0200)]
Use readdir() instead of readdir_r()
readdir_r() is deprecated in modern glibc versions. readdir() is
thread safe in practice, as long as there are no concurrent accesses
on the *same* directory stream.
Nikita Popov [Thu, 11 Apr 2019 14:45:45 +0000 (16:45 +0200)]
Remove curl gnutls locking
This is only relevant for the gcrypt backend, which is no longer in
use. I couldn't find any hard info on when exactly gcrypt support was
dropped, but nette is the default since 2.11.1. Most code that still
has the gcrypt handling is checking against < 2.12. In either case,
those versions were released in 2010/2011.
Nikita Popov [Thu, 11 Apr 2019 13:54:09 +0000 (15:54 +0200)]
Fix libgd warnings
Nikita Popov [Thu, 11 Apr 2019 13:47:41 +0000 (15:47 +0200)]
Remove incorrect mbstring includes
And thus fix unused variable warnings.
Nikita Popov [Thu, 11 Apr 2019 13:39:24 +0000 (15:39 +0200)]
Remove unused function prototype
Nikita Popov [Thu, 11 Apr 2019 13:32:30 +0000 (15:32 +0200)]
Remove restrict zend_portability define
We're not using this anywhere, and it causes warnings, so I'm
dropping it. If we do end up needing this, it should be reintroduced
with a ZEND_ prefix.
Nikita Popov [Thu, 11 Apr 2019 13:22:59 +0000 (15:22 +0200)]
Fix error message in spl_autoload test
Nikita Popov [Thu, 11 Apr 2019 13:20:05 +0000 (15:20 +0200)]
Fix libmagic warnings
Nikita Popov [Thu, 11 Apr 2019 13:12:20 +0000 (15:12 +0200)]
Add script to generate libmagic.patch
Nikita Popov [Thu, 11 Apr 2019 12:12:38 +0000 (14:12 +0200)]
Remove the readline thread-safety warning
Would be nice to have this in configure, but we'd have to change
the ordering of extension & Zend processing for that.
Nikita Popov [Thu, 11 Apr 2019 11:58:20 +0000 (13:58 +0200)]
Fix pointer signedness warning in mysqlnd
Nikita Popov [Thu, 11 Apr 2019 11:55:11 +0000 (13:55 +0200)]
Remove unused rcsid variables
Nikita Popov [Thu, 11 Apr 2019 10:56:42 +0000 (12:56 +0200)]
Avoid curl ssl callback warnings with OpenSSL 1.1
Sebastian Bergmann [Thu, 11 Apr 2019 11:34:02 +0000 (13:34 +0200)]
Fix typo
Dmitry Stogov [Thu, 11 Apr 2019 11:24:04 +0000 (14:24 +0300)]
Fixed bug #77877 (call_user_func() passes $this to satatic methods).
Nikita Popov [Thu, 11 Apr 2019 10:36:01 +0000 (12:36 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 11 Apr 2019 10:34:18 +0000 (12:34 +0200)]
Avoid onig match param unused variable warning
Nikita Popov [Thu, 11 Apr 2019 10:22:52 +0000 (12:22 +0200)]
Suppress warnings using zend_quiet_write
Nikita Popov [Thu, 11 Apr 2019 08:48:52 +0000 (10:48 +0200)]
Generate ZEND_COUNT for sizeof()
sizeof() is an alias of count(), so we should generate the same
code for them.
Nikita Popov [Thu, 11 Apr 2019 08:40:54 +0000 (10:40 +0200)]
Make tsrm_env_lock() void
We're not checking the return value and the NTS version of this
generates warnings. If we want to handle lock failures, we should
do a hard abort inside tsrm_env_lock() itself.
Anatol Belski [Wed, 10 Apr 2019 13:47:36 +0000 (15:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Ensure double slashes are replaced by the path normalization
Nikita Popov [Mon, 25 Mar 2019 14:23:11 +0000 (15:23 +0100)]
Support VirtualProtect for opcache.protect_memory
Don't enable this on AppVeyor yet, as there is still an open
issue in phar.
Anatol Belski [Wed, 10 Apr 2019 13:20:36 +0000 (15:20 +0200)]
Ensure double slashes are replaced by the path normalization
Anatol Belski [Wed, 10 Apr 2019 12:57:04 +0000 (14:57 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix phar:// include handling with file cache
Anatol Belski [Wed, 10 Apr 2019 12:56:29 +0000 (14:56 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fix phar:// include handling with file cache
Anatol Belski [Wed, 10 Apr 2019 12:55:15 +0000 (14:55 +0200)]
Fix phar:// include handling with file cache
Nikita Popov [Wed, 10 Apr 2019 12:43:52 +0000 (14:43 +0200)]
Remove posix_getlogin() check from posix_getpwnam() test
It doesn't make sense to pass false to posix_getpwnam(). I'm not
sure what exactly this is guarding against, but it won't work in
this form.
Nikita Popov [Wed, 10 Apr 2019 11:39:17 +0000 (13:39 +0200)]
Make zlib include_path tests more robust
One file is placed inside the script directory, we need to make
sure it has a unique name as well.
Nikita Popov [Wed, 10 Apr 2019 11:07:01 +0000 (13:07 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 10 Apr 2019 11:06:55 +0000 (13:06 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 10 Apr 2019 11:06:02 +0000 (13:06 +0200)]
Fix 29nb_async_connect.phpt
Intermediate states are unreliable across versions (I think), make
sure we go through the whole connect procedure.
Nikita Popov [Wed, 10 Apr 2019 10:23:01 +0000 (12:23 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 10 Apr 2019 10:22:34 +0000 (12:22 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 10 Apr 2019 10:18:57 +0000 (12:18 +0200)]
Fix pgsql use after free trying to reuse closed connection
When a connection is closed, we also need to remove the hash entry
from the regular_list, as it now points to freed memory. To do this
store a reverse mapping from the connection to the hash string.
It would be nicer to introduce a wrapping structure for the pgsql
link resource that could store the hash (and notices), but that would
require large changes to the extension, so I'm going for a more
minimal fix here.
ROVAST [Wed, 10 Apr 2019 08:45:13 +0000 (10:45 +0200)]
fix a spell mistake
possbile => possible
Nikita Popov [Wed, 10 Apr 2019 08:38:52 +0000 (10:38 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 10 Apr 2019 08:38:32 +0000 (10:38 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Wed, 10 Apr 2019 08:36:11 +0000 (10:36 +0200)]
Fix use after free on pg_close() of default connection
Nikita Popov [Wed, 10 Apr 2019 08:01:49 +0000 (10:01 +0200)]
Use release for regex in imap
The regex may be used as a cache key now.
Nikita Popov [Tue, 9 Apr 2019 12:57:06 +0000 (14:57 +0200)]
Fix bug #77866: Port Serializable SPL classes to use __unserialize()
Payloads created using Serializable are still supported.
Nikita Popov [Tue, 9 Apr 2019 15:27:02 +0000 (17:27 +0200)]
Fixed bug #77873
Nikita Popov [Tue, 9 Apr 2019 15:18:49 +0000 (17:18 +0200)]
Fix leak on error in new serialization mechanism
Dmitry Stogov [Tue, 9 Apr 2019 13:12:13 +0000 (16:12 +0300)]
Fixed ext/ffi/tests/044.phpt failure on 32-bit Linux
Dmitry Stogov [Tue, 9 Apr 2019 12:37:19 +0000 (15:37 +0300)]
Eliminated check for assignment to itself
Dmitry Stogov [Tue, 9 Apr 2019 11:38:49 +0000 (14:38 +0300)]
Micro-optimization
Peter Kokot [Tue, 9 Apr 2019 00:09:42 +0000 (02:09 +0200)]
Remove duplicated substitude for Makefile
The substitution is already done in the CLI's config.m4 file. Current
SAPIs only provide one PHP_EXECUTABLE variable, i.e. PHP CLI so the one
in the configure.ac can be removed.
Dmitry Stogov [Mon, 8 Apr 2019 22:18:44 +0000 (01:18 +0300)]
Merge branch 'PHP-7.4' of git.php.net:php-src into PHP-7.4
* 'PHP-7.4' of git.php.net:php-src:
Remove HAVE_STRERROR
Dmitry Stogov [Mon, 8 Apr 2019 22:17:10 +0000 (01:17 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Repare SWITCH VM
Dmitry Stogov [Mon, 8 Apr 2019 22:11:02 +0000 (01:11 +0300)]
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Repare SWITCH VM
Dmitry Stogov [Mon, 8 Apr 2019 21:41:11 +0000 (00:41 +0300)]
Repare SWITCH VM
Peter Kokot [Mon, 8 Apr 2019 21:39:45 +0000 (23:39 +0200)]
Remove HAVE_STRERROR
Checking for the strerror function presence is no longer needed since it
is part of the C89 standard [1] and can be safely assumed that all
current systems have it.
Check in the configure.ac and Windows defined symbol are still left
until the file library (libmagic) will be updated.
[1]: https://port70.net/~nsz/c/c89/c89-draft.html
Florian Berberich [Fri, 29 Mar 2019 19:18:19 +0000 (20:18 +0100)]
Added range options to the float validation filter
php_filter_int (called via the constant FILTER_VALIDATE_INT) has the options min_range
and max_range. they allow the user to not only test if a value is a double but also if
the value is inside a specific range. php_filter_float (called via the constant
FILTER_VALIDATE_FLOAT) didn't provide this yet, making validation of numeric but
not-only-int values more complicated for the user.
this commits implements the options min_range and max_range for the function
php_filter_float to fix this inconsistency.
Nikita Popov [Mon, 8 Apr 2019 11:00:20 +0000 (13:00 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 8 Apr 2019 11:00:05 +0000 (13:00 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
twosee [Mon, 8 Apr 2019 10:58:46 +0000 (12:58 +0200)]
Preserve keys in emulate_read_fd_set()
Keys are already preserved in the non-emulated case.
Nikita Popov [Mon, 8 Apr 2019 09:41:53 +0000 (11:41 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 8 Apr 2019 09:41:26 +0000 (11:41 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 8 Apr 2019 09:40:50 +0000 (11:40 +0200)]
Fixed bug #77853
Nikita Popov [Mon, 8 Apr 2019 09:13:10 +0000 (11:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 8 Apr 2019 09:12:42 +0000 (11:12 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Mon, 8 Apr 2019 09:11:58 +0000 (11:11 +0200)]
Fixed bug #77844
We should probably return an integer result from the operation in
typed mode, right now the result is always a string.
Nikita Popov [Mon, 8 Apr 2019 08:18:26 +0000 (10:18 +0200)]
Fix invalid function by-ref prop assign handling