]> granicus.if.org Git - php/log
php
5 years agoFix compilation errors when building against libmysql
Sebastian Pop [Fri, 21 Jun 2019 07:15:35 +0000 (07:15 +0000)]
Fix compilation errors when building against libmysql

Closes GH-4316.

5 years agoFix out-of-bounds read in array compilation
Nikita Popov [Fri, 28 Jun 2019 08:24:56 +0000 (10:24 +0200)]
Fix out-of-bounds read in array compilation

UNPACK elements only have one child. Don't access the second one
until we have excluded this case.

5 years agoAdd tracked arena allocator
Nikita Popov [Fri, 28 Jun 2019 08:19:18 +0000 (10:19 +0200)]
Add tracked arena allocator

Available under -DZEND_TRACK_ARENA_ALLOC. This will use the system
allocator combined with arena checkpointing & release semantics
and allows analyzing arena usage under asan/valgrind.

I've sacrificed the duplicate arena implementation in mysqlnd, as
the integration with mysqlnd alloc is not worth the code duplication
to me.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 28 Jun 2019 10:37:28 +0000 (12:37 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Fri, 28 Jun 2019 10:36:33 +0000 (12:36 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed

5 years agoFix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed
Vincent [Wed, 26 Jun 2019 09:37:08 +0000 (11:37 +0200)]
Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed

Reset stmt->columns when column count changed on new execution of prepared statement

5 years agoAdd support for proc_open() with a command array
Nikita Popov [Mon, 24 Jun 2019 10:53:40 +0000 (12:53 +0200)]
Add support for proc_open() with a command array

In this case the progarm will be executed directly, without a shell.
On Linux the arguments are passed directly to execvp and no escaping
is necessary. On Windows we construct a command string using escaping
with the default Windows command-line argument parsing method described
at https://docs.microsoft.com/en-us/cpp/cpp/parsing-cpp-command-line-arguments.

Apart from avoiding the issue of argument escaping, passing an array
and bypassing shell has the advantage of allowing proper signal
delivery to the opened process (rather than the shell).

5 years agoReduce overhead
Dmitry Stogov [Fri, 28 Jun 2019 09:03:01 +0000 (12:03 +0300)]
Reduce overhead

5 years agoimplement tsrm_is_shutdown API
Joe Watkins [Wed, 26 Jun 2019 11:18:50 +0000 (13:18 +0200)]
implement tsrm_is_shutdown API

5 years agoUse the portable zend_strndup() instead of strndup()
Christoph M. Becker [Fri, 28 Jun 2019 08:20:50 +0000 (10:20 +0200)]
Use the portable zend_strndup() instead of strndup()

5 years agoFixed use-after-free
Dmitry Stogov [Fri, 28 Jun 2019 07:43:56 +0000 (10:43 +0300)]
Fixed use-after-free

5 years agoFix mysqlnd memory leak
Nikita Popov [Thu, 27 Jun 2019 14:52:19 +0000 (16:52 +0200)]
Fix mysqlnd memory leak

The actual leak is observed in ext/pdo_mysql/tests/bug_74376.phpt.
The persistent connection leaks because a refcount decrement on a
result is missed. The refcount decrement is missed because
free_result_contents is used, rather than free_result.

Looking at other uses of free_result_contents, it looks like they
could also suffer from this problem. Apart from one case,
free_result_contents is always used to release the result entirely
(I've adjusted the one differing case to only free meta), so I'm
moving most of the logic from free_result into free_result_contents.
The only difference is now that free_result will skip_result first.

5 years agoFree ZTS lock in opcache
Nikita Popov [Thu, 27 Jun 2019 14:01:13 +0000 (16:01 +0200)]
Free ZTS lock in opcache

For some reason this only shows up as a leak when using phpdbg.

5 years agoFix init_file leak in phpdbg
Nikita Popov [Thu, 27 Jun 2019 13:43:50 +0000 (15:43 +0200)]
Fix init_file leak in phpdbg

5 years agorun-tests: Don't pass --INI-- settings to --SKIPIF--
Nikita Popov [Thu, 27 Jun 2019 12:07:20 +0000 (14:07 +0200)]
run-tests: Don't pass --INI-- settings to --SKIPIF--

If we're testing ini settings that cause startup failures, we'll
never get to that SKIPIF block...

Also change settings2param to return a value instead of modifying
(to a different type no less!) in place.

5 years agoFix custom heap free
Nikita Popov [Fri, 28 Jun 2019 07:13:45 +0000 (09:13 +0200)]
Fix custom heap free

This seems to be designed around the use-case where the custom
allocator is a wrapper around ZMM.

5 years agoBugfix #78208 Needs rehash with an unknown algo should always return true.
Sara Golemon [Thu, 27 Jun 2019 23:00:32 +0000 (19:00 -0400)]
Bugfix #78208 Needs rehash with an unknown algo should always return true.

5 years agoCatch up with some recent changes [ci skip]
Peter Kokot [Tue, 25 Jun 2019 20:32:54 +0000 (22:32 +0200)]
Catch up with some recent changes [ci skip]

- Mention mysqli::stat()
- Mention removal of HAVE_* for always defined extensions
- Mention removed symbols defined during the build

5 years agoRemove HAVE_STRCOLL check
Peter Kokot [Sun, 23 Jun 2019 13:51:24 +0000 (15:51 +0200)]
Remove HAVE_STRCOLL check

The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.

https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3

- Remove also SKIPIF strcoll check in test

5 years agoSync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbols
Peter Kokot [Wed, 26 Jun 2019 01:01:45 +0000 (03:01 +0200)]
Sync HAVE_HASH, HAVE_HASH_EXT, PHAR_HASH_OK symbols

The hash extension is always available since PHP-7.4. The symbol
HAVE_HASH_EXT is kept for BC reasons and removed in PHP-8.0.

This patch also removes the PHAR_HASH_OK since it is no longer
relevant.

5 years agoRemove posix_getlogin_basic.phpt test
Nikita Popov [Thu, 27 Jun 2019 14:15:13 +0000 (16:15 +0200)]
Remove posix_getlogin_basic.phpt test

The premise of this test (that the getlogin user has to be the same
as the geteuid user) is incorrect.

5 years agoFix opcache blacklist leak
Nikita Popov [Thu, 27 Jun 2019 11:09:14 +0000 (13:09 +0200)]
Fix opcache blacklist leak

Don't recompute (and leak) the regex for every glob element, only
do this once at the end.

5 years agoFix phpdbg shutdown order
Nikita Popov [Thu, 27 Jun 2019 10:46:06 +0000 (12:46 +0200)]
Fix phpdbg shutdown order

In particular, make sure that everything using zmm is released
before zmm is shut down. phpdbg currently gets away with this,
because either a) its custom handlers are used and no auto-free
happens or b) the system allocator is used and no auto-free happens.
With the tracking allocator for asan this no longer works.

5 years agoDon't use zmm for PHPDBG_G(exec)
Nikita Popov [Thu, 27 Jun 2019 10:41:41 +0000 (12:41 +0200)]
Don't use zmm for PHPDBG_G(exec)

Uses system allocator when backing up settings ... let's avoid
unnecessary confusion.

5 years agoFix persistent XML memory leaks in SOAP
Nikita Popov [Thu, 27 Jun 2019 08:57:49 +0000 (10:57 +0200)]
Fix persistent XML memory leaks in SOAP

SOAP uses a horrible bailout based error handling approach -- avoid
leaking persistent XML memory by catching bailouts in a number of
places.

5 years agoAdd tracked allocator mode
Nikita Popov [Thu, 27 Jun 2019 08:30:45 +0000 (10:30 +0200)]
Add tracked allocator mode

In this case we will use the system allocator, but still remember
all allocations and free them the same way that Zend MM does. This
allows us to accurately model leak behavior.

Enabled using USE_ZEND_ALLOC=0 USE_TRACKED_ALLOC=1.

5 years agoShow actual enchant version if possible
Christoph M. Becker [Thu, 27 Jun 2019 11:04:49 +0000 (13:04 +0200)]
Show actual enchant version if possible

As of libenchant 1.6.0 there is enchant_get_version()[1], so we use it,
if available, to show the actual enchant version in the PHP info.  We
also drop the fake ENCHANT_VERSION_STRING altogether, but stick with
showing version 1.5.x if at least HAVE_ENCHANT_BROKER_SET_PARAM is
defined.

Future scope: we may consider requiring enchant 1.6.0 (or later), since
this has been released in April 2010, and likely is available
everywhere.

[1] <https://www.abisource.com/projects/enchant/>

5 years agoSeparate common code abd eliminate useless checks
Dmitry Stogov [Thu, 27 Jun 2019 10:11:08 +0000 (13:11 +0300)]
Separate common code abd eliminate useless checks

5 years agoInline hot path
Dmitry Stogov [Thu, 27 Jun 2019 08:27:53 +0000 (11:27 +0300)]
Inline hot path

5 years agoFix persistent connection leak in mysqli
Nikita Popov [Wed, 26 Jun 2019 14:51:12 +0000 (16:51 +0200)]
Fix persistent connection leak in mysqli

5 years agoFix use-after-free in stream freeing during shutdown
Nikita Popov [Wed, 26 Jun 2019 08:58:29 +0000 (10:58 +0200)]
Fix use-after-free in stream freeing during shutdown

Streams will be freed in an unpredictable order during shutdown.
Ignore explicit calls to php_stream_close() entirely to avoid
use-after-free -- instead let the stream resource destructor
deal with it. We have to account for a few special cases:

 * Enclosed streams should be freed, as the resource destructor
   will forward to the enclosing stream.
 * Stream cookies also directly free streams, because we delegate
   to the cookie destruction if one exists.
 * Mysqlnd also directly frees streams, because it explicitly
   removes stream resources (because mysqlnd!)

5 years agoClean headers checks
Peter Kokot [Sun, 23 Jun 2019 20:04:03 +0000 (22:04 +0200)]
Clean headers checks

Some headers were checked multiple times in the main configure.ac file
and in the bundled extensions or SAPIs themselves. Also many of these
checks are then used accross other extensions or SAPIs so a central
configure.ac makes most sense for these checks.

5 years agoAvoid double checks on early binding
Dmitry Stogov [Wed, 26 Jun 2019 23:13:06 +0000 (02:13 +0300)]
Avoid double checks on early binding

5 years agoRemove warnings for bison and re2c checks
Peter Kokot [Sun, 23 Jun 2019 13:53:19 +0000 (15:53 +0200)]
Remove warnings for bison and re2c checks

This patch removes warnings when lexer and parser files are already
generated. For example, when downloading a PHP release. Realistically,
it is not so trivial to rebuild lexer and parser files without removing
them first. And considering that tarballs don't have cleaning tools
such as Git, this would require manual removali.

Related also to https://bugs.gentoo.org/593278

5 years agoFix concurrent testing of bug 61964
Peter Kokot [Tue, 25 Jun 2019 19:23:07 +0000 (21:23 +0200)]
Fix concurrent testing of bug 61964

When tests are run concurrently using the -j option there might be a
change of failure and writing to the same directory from both tests.

Use test filenames for generated temp dirs

5 years agoFix posix_errno test without PCNTL dep
Peter Kokot [Tue, 25 Jun 2019 18:21:16 +0000 (20:21 +0200)]
Fix posix_errno test without PCNTL dep

When PCNTL extension is not enabled, the SIGKILL constant is also not
available.

5 years agoRemove unused HAVE_DATE and HAVE_SPL symbols
Peter Kokot [Wed, 26 Jun 2019 00:36:44 +0000 (02:36 +0200)]
Remove unused HAVE_DATE and HAVE_SPL symbols

These two are never defined anymore since PHP 7.4 and can be
considered to have always available date and hash extensions.

5 years agoRemove HAVE_STRTOD and strtod check
Peter Kokot [Sun, 23 Jun 2019 13:41:43 +0000 (15:41 +0200)]
Remove HAVE_STRTOD and strtod check

There is no need to check for the strtod function. It is part of C89
standard which PHP-7.4+ supports.

http://port70.net/~nsz/c/c89/c89-draft.html#4.10.1.4

5 years agoSet Computer English language for credits sorting
Peter Kokot [Sun, 23 Jun 2019 13:43:25 +0000 (15:43 +0200)]
Set Computer English language for credits sorting

This makes the script a bit more portable when used on systems with
different LC_ALL and LANG settings.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 26 Jun 2019 15:02:08 +0000 (17:02 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Remove stream_socket_sendto.phpt

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Wed, 26 Jun 2019 15:01:29 +0000 (17:01 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Remove stream_socket_sendto.phpt

5 years agoRemove stream_socket_sendto.phpt
Nikita Popov [Wed, 26 Jun 2019 14:58:37 +0000 (16:58 +0200)]
Remove stream_socket_sendto.phpt

Fails for me locally due to different number of warnings with
different messages. Rather than adding more wildcards I'm dropping
this test entirely, as it doesn't seem to test anything particularly
useful.

(cherry picked from commit 84333cad674890174c47f3c21b1b1cf85a4276ac)

5 years agoPrivate methods don't have to be duplicated
Dmitry Stogov [Wed, 26 Jun 2019 10:27:13 +0000 (13:27 +0300)]
Private methods don't have to be duplicated

5 years agoFix xml doc leak in soap
Nikita Popov [Tue, 25 Jun 2019 14:57:09 +0000 (16:57 +0200)]
Fix xml doc leak in soap

5 years agoUse ldap_destroy instead of ldap_unbind_ext
Nikita Popov [Tue, 25 Jun 2019 13:49:28 +0000 (15:49 +0200)]
Use ldap_destroy instead of ldap_unbind_ext

5 years agoFix fpm limit_extensions leak
Nikita Popov [Tue, 25 Jun 2019 13:01:58 +0000 (15:01 +0200)]
Fix fpm limit_extensions leak

The logic here is somewhat ugly because the worker pool structure
gets freed early, so we need to explicitly transfer ownership.

5 years agoReorder conditions to minimize number of checks on fast path
Dmitry Stogov [Tue, 25 Jun 2019 22:00:31 +0000 (01:00 +0300)]
Reorder conditions to minimize number of checks on fast path

5 years agoRemove always true/false conditions, remove dead conde and simplify code.
Dmitry Stogov [Tue, 25 Jun 2019 21:32:22 +0000 (00:32 +0300)]
Remove always true/false conditions, remove dead conde and simplify code.

5 years agoReplace previosly checked conditions by ZEND_ASSERT()
Dmitry Stogov [Tue, 25 Jun 2019 15:26:56 +0000 (18:26 +0300)]
Replace previosly checked conditions by ZEND_ASSERT()

5 years agoFixed variance check for abstract constructor during erlay binding
Dmitry Stogov [Tue, 25 Jun 2019 14:43:46 +0000 (17:43 +0300)]
Fixed variance check for abstract constructor during erlay binding

5 years agoCleanup
Dmitry Stogov [Tue, 25 Jun 2019 13:37:42 +0000 (16:37 +0300)]
Cleanup

5 years agoFFI: Perform bitfield operations byte-wise
Nikita Popov [Tue, 25 Jun 2019 09:32:18 +0000 (11:32 +0200)]
FFI: Perform bitfield operations byte-wise

Otherwise we may perform reads/writes outside the allocation, as
already happens in 032.phpt.

5 years agoFix out of bounds write in phpdbg
Nikita Popov [Tue, 25 Jun 2019 11:08:28 +0000 (13:08 +0200)]
Fix out of bounds write in phpdbg

It seems that this code has a peculiar interpretation of "len",
where it actually points to the last character, not one past it.
So we need +1 here for that extra char and another +1 for the
terminating null byte.

5 years agoFix CURLINFO_COOKIELIST leak
Nikita Popov [Tue, 25 Jun 2019 11:17:39 +0000 (13:17 +0200)]
Fix CURLINFO_COOKIELIST leak

5 years agoFix leak on sqlite3 open error
Nikita Popov [Tue, 25 Jun 2019 10:46:58 +0000 (12:46 +0200)]
Fix leak on sqlite3 open error

sqlite3_open creates the database object even if the operation
fails.

5 years agoFix SSL_CTX leak in ftp extension
Nikita Popov [Tue, 25 Jun 2019 10:09:47 +0000 (12:09 +0200)]
Fix SSL_CTX leak in ftp extension

SSL_CTX is a refcounted structure, which will be held by the SSL
handle, so we can free it here.

5 years agoFix UConverter leak
Nikita Popov [Tue, 25 Jun 2019 10:02:01 +0000 (12:02 +0200)]
Fix UConverter leak

5 years agoFix TimeZone leak in intl MessageFormat
Nikita Popov [Tue, 25 Jun 2019 09:51:40 +0000 (11:51 +0200)]
Fix TimeZone leak in intl MessageFormat

I'm just giving each format a distinct owned object here ... sharing
it looks complicated.

5 years agoFix stream leak in phar cache_list
Nikita Popov [Mon, 24 Jun 2019 15:35:22 +0000 (17:35 +0200)]
Fix stream leak in phar cache_list

5 years agorun-tests: Don't die unnecessarily
Nikita Popov [Fri, 21 Jun 2019 15:08:24 +0000 (17:08 +0200)]
run-tests: Don't die unnecessarily

die/exit leak memory, don't use them if we don't need to.

5 years agoSet ZEND_ACC_LINKED flag after early binding (for consistency)
Dmitry Stogov [Tue, 25 Jun 2019 12:05:27 +0000 (15:05 +0300)]
Set ZEND_ACC_LINKED flag after early binding (for consistency)

5 years agoReduce overhead of delayed early binding
Dmitry Stogov [Tue, 25 Jun 2019 11:20:41 +0000 (14:20 +0300)]
Reduce overhead of delayed early binding

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 25 Jun 2019 11:05:53 +0000 (13:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78202: Opcache stats for cache hits are capped at 32bit NUM

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Christoph M. Becker [Tue, 25 Jun 2019 11:04:28 +0000 (13:04 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix #78202: Opcache stats for cache hits are capped at 32bit NUM

5 years agoFix #78202: Opcache stats for cache hits are capped at 32bit NUM
Christoph M. Becker [Tue, 25 Jun 2019 07:56:33 +0000 (09:56 +0200)]
Fix #78202: Opcache stats for cache hits are capped at 32bit NUM

We use the proper format specifiers now.

5 years agoPrevent useless hash lookups
Dmitry Stogov [Tue, 25 Jun 2019 09:41:06 +0000 (12:41 +0300)]
Prevent useless hash lookups

5 years agoUpdate NEWS for 7.4.0alpha3
Derick Rethans [Tue, 25 Jun 2019 09:03:00 +0000 (09:03 +0000)]
Update NEWS for 7.4.0alpha3

5 years agoUpdate NEWS for PHP 7.4.0alpha2
Derick Rethans [Tue, 25 Jun 2019 09:01:40 +0000 (09:01 +0000)]
Update NEWS for PHP 7.4.0alpha2

5 years agoKeep lowercased parent class name as second argument of DECLARE_CLASS to avoid extra...
Dmitry Stogov [Tue, 25 Jun 2019 08:26:29 +0000 (11:26 +0300)]
Keep lowercased parent class name as second argument of DECLARE_CLASS to avoid extra work at run-time

5 years agoAvoid confusing gotos in phar_split_cache_list
Nikita Popov [Mon, 24 Jun 2019 15:11:21 +0000 (17:11 +0200)]
Avoid confusing gotos in phar_split_cache_list

5 years agoFix EVP_PKEY leak in phar
Nikita Popov [Mon, 24 Jun 2019 14:51:40 +0000 (16:51 +0200)]
Fix EVP_PKEY leak in phar

5 years agoDon't force USE_ZEND_ALLOC=0 in run-tests.php
Nikita Popov [Mon, 24 Jun 2019 13:41:03 +0000 (15:41 +0200)]
Don't force USE_ZEND_ALLOC=0 in run-tests.php

USE_ZEND_ALLOC=0 is useful not just for valgrind ... we should not
force USE_ZEND_ALLOC=1 if the user explicitly disabled it.

5 years agoFix region leak in mb_ereg_replace
Nikita Popov [Mon, 24 Jun 2019 07:30:59 +0000 (09:30 +0200)]
Fix region leak in mb_ereg_replace

5 years agoFixed bug 78175 (Preloading must store default values of static variables and properties)
Dmitry Stogov [Mon, 24 Jun 2019 17:32:27 +0000 (20:32 +0300)]
Fixed bug 78175 (Preloading must store default values of static variables and properties)

5 years agoSplit test case
Christoph M. Becker [Sun, 23 Jun 2019 11:54:42 +0000 (13:54 +0200)]
Split test case

This test is failing on AppVeyor almost all of the time, so splitting
it seems appropriate.  This also allows us to rid php_cli_server_stop()
which was only used by this test case.

5 years agoAdd debugging code to time_sleep_until test
Nikita Popov [Sat, 22 Jun 2019 08:19:49 +0000 (10:19 +0200)]
Add debugging code to time_sleep_until test

5 years agoMerge branch 'bug67348-mysqli-stat' into PHP-7.4
Derick Rethans [Fri, 21 Jun 2019 15:52:15 +0000 (16:52 +0100)]
Merge branch 'bug67348-mysqli-stat' into PHP-7.4

5 years agoFixed bug #67348: Reading $dbc->stat modifies $dbc->affected_rows
Derick Rethans [Fri, 21 Jun 2019 15:50:40 +0000 (16:50 +0100)]
Fixed bug #67348: Reading $dbc->stat modifies $dbc->affected_rows

5 years agoFix stack leak in phpdbg
Nikita Popov [Fri, 21 Jun 2019 14:52:08 +0000 (16:52 +0200)]
Fix stack leak in phpdbg

5 years agoFix prompt leak in phpdbg
Nikita Popov [Fri, 21 Jun 2019 13:56:02 +0000 (15:56 +0200)]
Fix prompt leak in phpdbg

5 years agoProperly shut down font cache mutex
Christoph M. Becker [Fri, 21 Jun 2019 11:50:19 +0000 (13:50 +0200)]
Properly shut down font cache mutex

Since the font cache mutex in set up in MINIT, we have to shut it down
in MSHUTDOWN.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Andrey Hristov [Fri, 21 Jun 2019 13:33:01 +0000 (16:33 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Andrey Hristov [Fri, 21 Jun 2019 13:32:13 +0000 (16:32 +0300)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoAdd explicit cast to uint32_t.
Andrey Hristov [Fri, 21 Jun 2019 13:30:25 +0000 (16:30 +0300)]
Add explicit cast to uint32_t.

It works even without it but explicit stuff is better. The compiler probably converts the 16-bit
uint16_t to uint32_t before doing the shift.

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 21 Jun 2019 13:08:12 +0000 (15:08 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Fri, 21 Jun 2019 13:07:59 +0000 (15:07 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix PKCS12 leak in openssl
Nikita Popov [Fri, 21 Jun 2019 13:00:25 +0000 (15:00 +0200)]
Fix PKCS12 leak in openssl

5 years agoFix d leak in ecc openssl_pkey_new
Nikita Popov [Fri, 21 Jun 2019 12:43:15 +0000 (14:43 +0200)]
Fix d leak in ecc openssl_pkey_new

5 years agoFix netscape spki leak in openssl
Nikita Popov [Fri, 21 Jun 2019 12:35:35 +0000 (14:35 +0200)]
Fix netscape spki leak in openssl

5 years agoFix X509 leak in openssl_pkcs7_verify()
Nikita Popov [Fri, 21 Jun 2019 12:24:00 +0000 (14:24 +0200)]
Fix X509 leak in openssl_pkcs7_verify()

5 years agoFix CSR leaks in openssl
Nikita Popov [Fri, 21 Jun 2019 12:17:05 +0000 (14:17 +0200)]
Fix CSR leaks in openssl

5 years agoFree cert in php_openssl_load_stream_cafile()
Nikita Popov [Fri, 21 Jun 2019 12:03:06 +0000 (14:03 +0200)]
Free cert in php_openssl_load_stream_cafile()

X509_STORE_add_cert() increments the refcount of the cert, so we
should free it here.

5 years agoFix memory leaks in browscap parsing
Nikita Popov [Fri, 21 Jun 2019 10:10:09 +0000 (12:10 +0200)]
Fix memory leaks in browscap parsing

Also make the interning a bit more efficient, no need to check for
a "real" interned string every time, we can also store that in the
HT.

5 years agoFix leak in bcpowmod
Nikita Popov [Fri, 21 Jun 2019 10:17:42 +0000 (12:17 +0200)]
Fix leak in bcpowmod

5 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 21 Jun 2019 10:56:12 +0000 (12:56 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

5 years agoMerge branch 'PHP-7.2' into PHP-7.3
Nikita Popov [Fri, 21 Jun 2019 10:55:12 +0000 (12:55 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

5 years agoFix memory leak in TLS matches_san_list
Niklas Keller [Fri, 3 Aug 2018 19:00:14 +0000 (21:00 +0200)]
Fix memory leak in TLS matches_san_list

5 years agoCleanup
Dmitry Stogov [Fri, 21 Jun 2019 08:43:17 +0000 (11:43 +0300)]
Cleanup

5 years agoMake ZEND_SEND_* flags unsigned
Nikita Popov [Fri, 21 Jun 2019 08:21:35 +0000 (10:21 +0200)]
Make ZEND_SEND_* flags unsigned

These may be shifted to the limit for the arg mask.

5 years agoAvoid ub in shift overflow check
Nikita Popov [Fri, 21 Jun 2019 07:52:43 +0000 (09:52 +0200)]
Avoid ub in shift overflow check

Also fix an off-by-one error. While 1 << 63 overflows, -1 << 63 does
not.