Commit Graph

56006 Commits

Author SHA1 Message Date
Nikita Popov
e4f5190942 Only test one error in socket_strerror() test
The messages differ by used libc and version, so let's not try to
do exhaustive testing here.
2020-08-10 15:58:38 +02:00
Nikita Popov
c439f1fa6a Fixed bug #62294
The primary issue was already resolved in 7c3e487289,
but the particular example used in this bug report ran into an
additional issue on PHP 8, because I forgot to drop a number of
zend_bailout calls when switch require failure to throw.
2020-08-10 12:54:02 +02:00
Nikita Popov
90a2c79be0 Remove some unnnecessary null checks in openssl
Remove null checks before EVP_PKEY_free and BIO_free. NULL is a
no-op for both of these. Probably applies to most other freeing
function as well...
2020-08-10 12:10:30 +02:00
Nikita Popov
80d3ce3d19 Improve X509_PKEY management in OpenSSL
Remove the free_pkey argument from php_openssl_pkey_from_zval,
instead return an EVP_PKEY that always needs to be freed
(by incrementing refcount if necessary).

This makes the code simpler and fixes a number of bugs in the
existing handling.

Closes GH-5946.
2020-08-10 11:43:49 +02:00
Nikita Popov
1974522a2d Fixup phar test 2020-08-10 10:47:18 +02:00
Nikita Popov
da0a0a13be Fixed bug #79946
Declare __STDC_CONSTANT_MACROS and __STDC_FORMAT_MACROS via -D
to make sure they are declared before the first stdint.h include.
We also define these in php_stdint.h, but don't always include that
file first.

This is necessary for old compilers that use C99 rather than C11
semantics for stdint.h.
2020-08-10 09:52:22 +02:00
David Carlier
cedf463d1b proc_open/openpty: DragonFlyBSD build fix.
Similarly to NetBSD emalloc-ish api had been introduced into libutil.

Closes GH-5960.
2020-08-10 09:49:18 +02:00
Máté Kocsis
7aacc705d0
Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
George Peter Banyard
e208cb23c6 Promote various warnings to Error in GMP extension
This gets rid of most false returns

Closes GH-5882
2020-08-07 18:17:34 +02:00
George Peter Banyard
c74001997f Drop '#if 0' in mysqlnd_debug() from the MySQLnd extension
Closes GH-5587
2020-08-07 18:17:33 +02:00
Nikita Popov
8bc505cf47 Remove some duplicate iconv path logic
PHP_SETUP_ICONV already adds the include path to INCLUDES and the
library path to SHARED_LIBADD.
2020-08-07 18:10:29 +02:00
Nikita Popov
7bd1d70341 Remove PHP_ICONV_H_PATH
Directly include <iconv.h> instead, now that the giconv.h
distinction no longer exists.
2020-08-07 17:03:41 +02:00
Nikita Popov
2d359749a4 Remove giconv support
The best information I was able to find about this is this mail
from 2009 which indicates that giconv is an old FreeBSD iconv
implementation that has long since been superseded by libiconv.

https://lists.samba.org/archive/samba-technical/2009-June/065177.html
2020-08-07 17:03:41 +02:00
Nikita Popov
65592840f0 Remove more leftovers of PHP_DEFINE handling 2020-08-07 17:03:41 +02:00
David Carlier
327db7e595 opcache gdb: Set the EI_OSABI value for NetBSD.
Closes GH-5948.
2020-08-07 17:00:32 +02:00
Máté Kocsis
046cc5e4c2
Add another round of missing parameter types to stubs
Closes GH-5950
2020-08-07 16:48:45 +02:00
Máté Kocsis
7b9f37c389
Fix ZPP order in ext/phar 2020-08-07 16:47:50 +02:00
Nikita Popov
8b77c58130 Accept zend_object* in zend_update_property 2020-08-07 16:40:27 +02:00
Nikita Popov
01cbb5967c Accept zend_object* in zend_unset_property 2020-08-07 16:40:27 +02:00
Nikita Popov
978b7de244 Accept zend_object* in zend_get_exception_base 2020-08-07 16:40:27 +02:00
Nikita Popov
7991fc2753 Accept zend_object in zend_read_property 2020-08-07 16:40:27 +02:00
Christoph M. Becker
0400d07e61 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Prevent tempnam tests conflicts
2020-08-07 15:06:40 +02:00
Christoph M. Becker
fa9bd812fc Prevent tempnam tests conflicts 2020-08-07 15:04:27 +02:00
Nikita Popov
17d1eb3ca6 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #70574: Move files to proper locale dir
2020-08-07 14:37:50 +02:00
Nikita Popov
fab2c3ba86 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #70574: Move files to proper locale dir
2020-08-07 14:37:43 +02:00
Florian Engelhardt
5be670265b Fix bug #70574: Move files to proper locale dir
Closes GH-5940.
2020-08-07 14:37:27 +02:00
Nikita Popov
e6f7784210 Don't use PHP_DEFINE in iconv
iconv is the only consumer of this custom define mechanism that
puts every define into a single file. Use the standard mechanism
instead.
2020-08-07 14:29:04 +02:00
Máté Kocsis
af80d8a14e
Add more argument types to stubs
Closes GH-5943
2020-08-07 12:35:30 +02:00
Nikita Popov
3bb1830369 Reapply "Explicitly validate popen mode"
To avoid behavior differences due to libc. This time with the
check only for the non-win32 case, as Windows support additional
modifiers here (t/b).
2020-08-07 10:33:27 +02:00
Nikita Popov
7c8467562d Revert "Explicitly validate popen mode"
This reverts commit ab36540bdd.

Causes a test failure on Windows.
2020-08-06 21:53:13 +02:00
George Peter Banyard
196f8fdfc3 Promote warnings to Error in FileInfo extension
Closes GH-5914
2020-08-06 13:37:36 +02:00
Nikita Popov
b3f0f35fd7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix file clash in zlib test
2020-08-06 12:35:37 +02:00
Nikita Popov
a35379de2e Fix file clash in zlib test 2020-08-06 12:34:14 +02:00
Nikita Popov
84a080ef50 Avoid getThis() usages in zip extension
There isn't any magic going on here, we can just use ZEND_THIS
and assume it exists.
2020-08-06 11:28:35 +02:00
Nikita Popov
ab36540bdd Explicitly validate popen mode
To avoid behavior differences due to libc.
2020-08-06 10:26:46 +02:00
Nikita Popov
0dda242bde Add GLOB_BRACE skipif 2020-08-06 10:26:32 +02:00
Nikita Popov
2965c8f868 Prefer strtoll over atoll
Both are specified by C99, but strtoll has specified overflow
behavior while atoll does not, so prefer using it.
2020-08-05 18:40:23 +02:00
Nikita Popov
74b285d78c Merge branch 'PHP-7.4'
* PHP-7.4:
  Check ps -p availability in process title test
  Add privilege check in pcntl_unshare test
2020-08-05 18:18:51 +02:00
Nikita Popov
8fd79d3574 Add privilege check in pcntl_unshare test
Privileges for CLONE_NEWPID were not checked.
2020-08-05 18:18:06 +02:00
Nikita Popov
52047addc7 Only force log startup errors if display_startup_errors disabled
Otherwise this results in duplicate errors.

Closes GH-5941.
2020-08-05 18:17:00 +02:00
Nikita Popov
af64001dcb Normalize error message capitalization 2020-08-05 16:44:06 +02:00
Nikita Popov
25d849d40b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error
2020-08-05 16:42:55 +02:00
Nikita Popov
3b86be23e6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error
2020-08-05 16:42:13 +02:00
Nikita Popov
6a1bd57df5 Fix memory leak on socket_sendmsg() / socket_recvmsg() error 2020-08-05 16:41:40 +02:00
Nikita Popov
643145b59d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79930
  Fix iov_base pointer type for illumos
  Backport bless_tests.php changes from PHP 8
2020-08-05 15:44:04 +02:00
Nikita Popov
6bf8ff6d97 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #79930
2020-08-05 15:44:00 +02:00
Nikita Popov
da786a22af Fixed bug #79930
We're inserting src_zval, so that's what we should addref.
2020-08-05 15:43:41 +02:00
Nikita Popov
9d9fa32fe5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix iov_base pointer type for illumos
2020-08-05 15:18:03 +02:00
David Carlier
12db8b90a7 Fix iov_base pointer type for illumos
These systems has two versions of the iovec interface dependent on
compiler flags passed, the legacy version causing little build issue.

Closes GH-5939.
2020-08-05 15:17:51 +02:00
Nikita Popov
002908a5c5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Unset ai_canonname field in dump
2020-08-05 14:59:06 +02:00