Commit Graph

12128 Commits

Author SHA1 Message Date
Christoph M. Becker
abaf9a76dc Fix #78620: Out of memory error
The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.
2019-10-04 09:08:01 +02:00
Joe Watkins
74ca3a5cad
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  fix #78624: session_gc return value for user defined session handlers
2019-10-04 06:16:18 +02:00
Joe Watkins
f45eb353d1
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix #78624: session_gc return value for user defined session handlers
2019-10-04 06:12:29 +02:00
Brent Shaffer
a6d219630c
fix #78624: session_gc return value for user defined session handlers 2019-10-04 06:12:02 +02:00
Joe Watkins
5a8e7b95a1
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #76809 (SSL settings aren't respected when persistent connection is reused)
2019-10-03 07:13:15 +02:00
Joe Watkins
f4d078b1c7
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #76809 (SSL settings aren't respected when persistent connection is reused)
2019-10-03 06:57:05 +02:00
Fábio Souto
9a2b42a5c1
Fix bug #76809 (SSL settings aren't respected when persistent connection is reused) 2019-10-03 06:56:21 +02:00
Joe Watkins
de83036f13
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #76859 stream_get_line skips data if used with data-generating filter
2019-10-03 06:51:56 +02:00
Joe Watkins
5b1bb23edf
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #76859 stream_get_line skips data if used with data-generating filter
2019-10-03 06:51:10 +02:00
Konstantin Kopachev
05560b67bc
Fix #76859 stream_get_line skips data if used with data-generating filter
stream_get-line repeatedly calls php_stream_fill_read_buffer until
enough data is accumulated in buffer. However, when stream contains
filters attached to it, then each call to fill buffer essentially
resets buffer read/write pointers and new data is written over old.
This causes stream_get_line to skip parts of data from stream
This patch fixes such behavior, so fill buffer call will append.
2019-10-03 06:50:43 +02:00
Christoph M. Becker
2508131588 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Revert "Fix #78620: Out of memory error"
2019-10-02 19:03:25 +02:00
Christoph M. Becker
d295e1dce2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Revert "Fix #78620: Out of memory error"
2019-10-02 19:02:28 +02:00
Christoph M. Becker
f2fb37a772 Revert "Fix #78620: Out of memory error"
This reverts commit 8ce04df7e0.

Cf. <https://github.com/php/php-src/pull/4766#discussion_r330658679>.
2019-10-02 19:01:35 +02:00
Christoph M. Becker
b262b24beb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78620: Out of memory error
2019-10-02 18:21:50 +02:00
Christoph M. Becker
752a34fb2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78620: Out of memory error
2019-10-02 18:20:09 +02:00
Christoph M. Becker
8ce04df7e0 Fix #78620: Out of memory error
If the integer addition in `ZEND_MM_ALIGNED_SIZE_EX` overflows, the
macro evaluates to `0`, what we should catch early.
2019-10-02 18:18:52 +02:00
Nikita Popov
e98e1f92c9 Allow SA_RESTART for SIGALRM
If no explicit restart_syscalls is passed, default to
restart_syscalls=0 for SIGALRM only, to reduce BC impact.
2019-10-02 10:09:17 +02:00
Erik Lundin
6462c19689
Fixed #75245 Don't set content of elements with only whitespaces 2019-10-02 08:17:04 +02:00
Derick Rethans
a453258959 Update NEWS for 7.4.0RC4 2019-10-01 08:31:43 +00:00
Derick Rethans
c5b4cd6556 Update NEWS for PHP 7.4.0RC3 2019-10-01 08:30:24 +00:00
Christoph M. Becker
59ac81f81e Update regarding changed OpenSSL default config path 2019-10-01 09:14:58 +02:00
Nikita Popov
0805e132b0 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-30 15:06:32 +02:00
Nikita Popov
6fcde56b03 Fixed bug #78612 2019-09-30 15:06:07 +02:00
Christoph M. Becker
70f367d48a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78609: mb_check_encoding() no longer supports stringable objects
2019-09-30 13:06:57 +02:00
Christoph M. Becker
2046b3ce4f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78609: mb_check_encoding() no longer supports stringable objects
2019-09-30 13:04:54 +02:00
Sergei Turchanov
e546d721e8 Fix #78413: php-fpm request_terminate_timeout does not take effect after fastcgi_finish_request
To retain legacy behavior I decided to add an option to control request
termination logic. If request_terminate_timeout_track_finished is set,
then request will be tracked for time limits even after
fastcgi_finish_request was called.

This patch depends on the fix provided in BUG 78469 (otherwise php-fpm
workers listening on named pipes on Windows will be erroneously terminated)
(PR #4636)
2019-09-30 12:54:09 +02:00
Christoph M. Becker
45db6fa567 Fix #78609: mb_check_encoding() no longer supports stringable objects
We apply type juggling for other types than array.
2019-09-30 12:42:04 +02:00
Nikita Popov
19e7e4b197 Fixed bug #78604
<?php followed by EOF is valid since PHP 7.4.
2019-09-30 10:41:14 +02:00
Nikita Popov
1806ce9cb0 Add max_depth option to unserialize()
Add a max_depth option to unserialize and an unserialize_max_depth
ini setting, which can be used to control the depth limit. The
default value is 4096.

This option is intended to prevent stack overflows during the
unserialization of deeply nested structures.

This fixes bug #78549 and addresses oss-fuzz #17581, #17589, #17664,
and #17788.
2019-09-30 10:28:24 +02:00
Christoph M. Becker
7530938670 Update NEWS 2019-09-24 11:13:55 +02:00
Christoph M. Becker
8c9c58436b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix NEWS entry
2019-09-23 23:03:07 +02:00
Christoph M. Becker
ed099ab186 Fix NEWS entry
Cf. <https://bugs.php.net/78590>.
2019-09-23 22:59:55 +02:00
Christoph M. Becker
6dea11acd8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78579: mb_decode_numericentity: args number inconsistency
2019-09-21 16:17:45 +02:00
Christoph M. Becker
698088ca7c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78579: mb_decode_numericentity: args number inconsistency
2019-09-21 16:16:52 +02:00
Christoph M. Becker
398b308316 Fix #78579: mb_decode_numericentity: args number inconsistency
mb_decode_numericentity() accepts a fourth optional parameter, which is
unused, however.  Since this parameter doesn't do any harm, and to avoid
the small BC break, we're keeping this parameter for PHP 7, but adjust
the arginfo.

For PHP 8, we will remove this parameter.
2019-09-21 16:15:23 +02:00
Remi Collet
dc40332bb2 Fixed bug #78574 (broken shared build) 2019-09-20 13:30:13 +02:00
Christoph M. Becker
9dfbcd7248 Fix #78543: is_callable() on FFI\CData throws Exception
If `Z_OBJ_HANDLER_P(callable, get_closure)` throws, we must not let the
exeception pass to userland, if called through `is_callable()`.
2019-09-19 09:13:22 +02:00
Nikita Popov
e11ed02870 Fixed bug #78272
Use MAP_JIT only when running under hardened runtime, because MAP_JIT
is incompatible with fork().

The check is based on
f879e35e3e.
2019-09-18 10:41:27 +02:00
Derick Rethans
7baca20067 Update NEWS for 7.4.0RC3 2019-09-17 16:39:07 +00:00
Derick Rethans
19ac6b2a58 Update NEWS for PHP 7.4.0RC2 2019-09-17 16:37:49 +00:00
Derick Rethans
9ed247b7b1 Revert "Update NEWS for PHP 7.4.0RC2"
This reverts commit 050059cb26.
2019-09-17 17:32:33 +01:00
Derick Rethans
4c39f557e6 Revert "Update NEWS for 7.4.0RC3"
This reverts commit 803dc6b8f2.
2019-09-17 17:32:31 +01:00
Nikita Popov
c5d4c45e7d Merge branch 'PHP-7.2' into PHP-7.3 2019-09-17 15:42:58 +02:00
fancyweb
e691a98c1f Fix #76342: file_get_contents waits twice specified timeout 2019-09-17 15:42:29 +02:00
Derick Rethans
803dc6b8f2 Update NEWS for 7.4.0RC3 2019-09-17 07:37:35 +00:00
Derick Rethans
050059cb26 Update NEWS for PHP 7.4.0RC2 2019-09-17 07:36:16 +00:00
Christoph M. Becker
20f73d3d8f Fix #78429: opcache_compile_file(__FILE__); segfaults
We have to ensure that OPcache has been properly started up when
`opcache_compile_file()` is called.
2019-09-16 16:01:09 +02:00
Fabien Villepinte
42046c71ee Fix typo 2019-09-16 15:55:23 +02:00
Christoph M. Becker
145ffd93fc Fix #78516: password_hash(): Memory cost is not in allowed range
libsodium measures the memory cost in bytes, while password_hash() and
friends expect kibibyte values.  We have to properly map between these
scales not only when calling libsodium functions, but also when
checking for allowed values.

We also refactor to rid the code duplication.
2019-09-16 14:58:39 +02:00
Dmitry Stogov
6417c507ce Fixed typos 2019-09-16 10:29:29 +03:00
Christoph M. Becker
d0247a63b6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78535: auto_detect_line_endings value not parsed as bool
2019-09-14 18:48:28 +02:00
Christoph M. Becker
00ad365125 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78535: auto_detect_line_endings value not parsed as bool
2019-09-14 18:47:12 +02:00
bugreportuser
fdcca93056 Fix #78535: auto_detect_line_endings value not parsed as bool 2019-09-14 18:46:09 +02:00
Nikita Popov
df982da587 Fix bug #78525
When calling free_result_buffers(), also free field metadata and
restore the mempool state to what it was before any allocations
have been made. Remove the mempool save/restore logic for the
inner result set as this is now handled on a higher level.
2019-09-13 14:37:03 +02:00
Dmitry Stogov
e45a757bc2 Fixed incorrect usage of QM_ASSIGN instruction 2019-09-13 12:08:59 +03:00
Dmitry Stogov
51d9f32dbe Fixed bug #78531 (Crash when using undefined variable as object 2019-09-13 01:42:02 +03:00
Kalle Sommer Nielsen
f6f981c13c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  NEWS
2019-09-12 06:52:24 +03:00
Kalle Sommer Nielsen
716518373f NEWS 2019-09-12 06:50:53 +03:00
Nikita Popov
11f3e24190 Fixed bug #78506 2019-09-11 10:27:32 +02:00
Sara Golemon
a270eb1911 Bump for 7.2.24 2019-09-10 13:04:01 -04:00
Christoph M. Becker
cf31210f29 PHP 7.3.10RC1 has been tagged 2019-09-10 15:11:54 +02:00
Dmitry Stogov
21c3cdf668 NEWS entry, test and minor cleanup for FFI::isNull() 2019-09-10 11:23:12 +03:00
Simonov Denis
481f89551e Request #77863: PDO firebird support type Boolean in input parameters 2019-09-10 09:22:26 +02:00
CHU Zhaowei
1ac6b0251b Fix bug #72884 isCloneable() on SplFileObject should return false 2019-09-09 17:27:17 +02:00
Christoph M. Becker
167ea6307b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78510: Partially uninitialized buffer returned by sodium_crypto_generichash_init()
2019-09-09 15:33:02 +02:00
Christoph M. Becker
af2033b1cd Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78510: Partially uninitialized buffer returned by sodium_crypto_generichash_init()
2019-09-09 15:31:15 +02:00
Christoph M. Becker
8ead77936e Fix #78510: Partially uninitialized buffer returned by sodium_crypto_generichash_init()
Backport jedisct1/libsodium.php@28d13bf437.
2019-09-09 15:30:28 +02:00
Nikita Popov
36a8cf5182 Fixed bug #78514
The property class may have already been translated as part of
some other class. Only translate if xlat returns non-null.
2019-09-09 11:36:50 +02:00
Peter Kokot
f5dfea60a2 Update NEWS 2019-09-08 21:49:42 +02:00
Dmitry Stogov
1db0bad6a7 Fixed bug #78488 (OOB in ZEND_FUNCTION(ffi_trampoline)). 2019-09-04 12:16:12 +03:00
Christoph M. Becker
61dcae50d5 Document opcache.preload_user directive 2019-09-03 14:08:17 +02:00
Christoph M. Becker
fd7309d194 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #41997: SP call yields additional empty result set
2019-09-03 13:33:15 +02:00
Christoph M. Becker
b90cd91eba Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #41997: SP call yields additional empty result set
2019-09-03 13:31:24 +02:00
Christoph M. Becker
41a4379cb4 Fix #41997: SP call yields additional empty result set
When stored procedures are called, the "final result set is a status
result that includes no result set".  Calling `::nextRowset()` on the
actual last result set should return FALSE, since there is actually no
further result set to be processed.
2019-09-03 13:29:30 +02:00
Derick Rethans
c53da9b631 Update NEWS for 7.4.0RC2 2019-09-03 07:46:16 +00:00
Derick Rethans
ba7ae00bde Update NEWS for PHP 7.4.0RC1 2019-09-03 07:44:58 +00:00
Christoph M. Becker
f712925500 Update NEWS 2019-09-02 15:21:20 +02:00
Nikita Popov
e9cfd94b8e Merge branch 'PHP-7.2' into PHP-7.3 2019-08-30 16:07:43 +02:00
Sergei Turchanov
8f564e5308 Fixed bug #78469
fcgi_accept_request function is supposed to call a FastCGI implementation's
on_accept hook when entering an "accepting" stage (that is right before
calling "accept"). This hook implementation (fpm_request_accepting) updates
a worker state to an "accepting" state which is effectively an "Idle" state,
and updates counters on the scoreboard of the corresponding pool (idle++,
active--).

But this is not done when listening for client connections on a named pipe on
Windows platform. In that case a combination of
ConnectNamedPipe/WaitForSingleObject is used (to be able to catch in_shutdown
as far as I understand), but it is nonetheless functionally equivalent to
"accept" call. Also by not calling on_hook neither a worker's state is updated
to "accepting" state nor scoreboard counters are updated.
2019-08-30 16:06:50 +02:00
Peter Kokot
ae59a6d49d Update NEWS 2019-08-30 04:32:05 +02:00
Christoph M. Becker
35177027f4 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78473: odbc_close() closes arbitrary resources
2019-08-28 17:58:35 +02:00
Christoph M. Becker
195b8ae779 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78473: odbc_close() closes arbitrary resources
2019-08-28 17:57:10 +02:00
Christoph M. Becker
b557265816 Fix #78473: odbc_close() closes arbitrary resources
We have to bail out, if an invalid resource is given.  For consistency
with the other `zend_fetch_resource(2)` calls, we return `FALSE`.
2019-08-28 17:55:15 +02:00
Nikita Popov
ec9a96dc60 Fixed bug #78335
Destroy static properties and variables prior to the final GC run,
as they may hold GC roots.
2019-08-28 12:32:06 +02:00
Jakub Zelenka
302a1400f3 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-26 18:11:04 +01:00
Tsuyoshi Sadakata
ffcf57fa18 Fix bug #78334 (fpm log prefix message includes wrong stdout/stderr notation) 2019-08-26 18:05:11 +01:00
Nikita Popov
9483c50772 Fixed bug #78456 2019-08-26 11:08:42 +02:00
Theodore Brown
1a78bdab27 Fix #78454: Consecutive numeric separators cause OOM error
Resolves out of memory error when consecutive numeric separators follow a binary/hex literal.
2019-08-25 22:46:18 +02:00
Nikita Popov
13e92223c0 Fixed bug #78436 2019-08-23 15:27:28 +02:00
Christoph M. Becker
514be3ff87 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77812: Interactive mode does not support PHP 7.3-style heredoc
2019-08-23 14:04:31 +02:00
Christoph M. Becker
03c7749dc8 Fix #77812: Interactive mode does not support PHP 7.3-style heredoc
As of PHP 7.3.0, the rules regarding the heredoc and nowdoc closing
identifier have been relaxed.  While formerly, the closing identifier
was required to be placed at the beginning of a line and to be
immediately followed by (a semicolon and) a line break, it may now be
preceeded by whitespace, and may be followed by any non-word character.
We adjust the recognition logic respectively.
2019-08-23 13:59:10 +02:00
Christoph M. Becker
ca265eb545 Fix #78438: Corruption when __unserializing deeply nested structures
When storing two temporary variables for delayed __unserialize() calls,
we have to make sure that both fit into the same linked list element.
To that end we introduce the internal API `tmp_var` which allows to
reserve `num` slots in the same list element.

We also fix the `var_dtor_entries` struct definition to use the proper
size, namely `VAR_DTOR_ENTRIES_MAX`.
2019-08-23 11:41:06 +02:00
Christoph M. Becker
1eb75f2937 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78441: Parse error due to heredoc identifier followed by digit
2019-08-21 22:54:52 +02:00
Christoph M. Becker
310708845f Fix #78441: Parse error due to heredoc identifier followed by digit
Since digits are allowed for identifiers, we have to cater to them as
well.
2019-08-21 22:51:51 +02:00
Derick Rethans
cf678da52d Update NEWS for 7.4.0RC1 2019-08-20 14:10:36 +00:00
Derick Rethans
b3561e9329 Update NEWS for PHP 7.4.0beta4 2019-08-20 14:09:17 +00:00
Christoph M. Becker
c03114e55c Fix #78386: fstat mode has unexpected value on PHP 7.4
We must not assume that any file which is not a directory is a regular
file.  Therefore we employ `GetFileType()` in this case to properly
distinguish between character special, FIFO special and regular files.
2019-08-20 16:04:14 +02:00
Christoph M. Becker
a18f53ec2c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  fix the problem for connect_attr, set db condition, and add a new attribute _server_host
2019-08-20 13:35:17 +02:00
Christoph M. Becker
3771d66142 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix the problem for connect_attr, set db condition, and add a new attribute _server_host
2019-08-20 13:33:45 +02:00
Qianqian Bu
cdf16c010a fix the problem for connect_attr, set db condition, and add a new attribute _server_host 2019-08-20 13:31:58 +02:00
Christoph M. Becker
3775d47eee Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78220: Can't access OneDrive folder
2019-08-19 19:58:45 +02:00
Christoph M. Becker
5e19f1d458 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78220: Can't access OneDrive folder
2019-08-19 19:57:22 +02:00
Christoph M. Becker
81f52158b4 Fix #78220: Can't access OneDrive folder
As of Windows 1903, when the OneDrive on-demand feature is enabled, the
OneDrive folder is reported as reparse point by `FindFirstFile()`, but
trying to get information about the reparse point using
`DeviceIoControl()` fails with `ERROR_NOT_A_REPARSE_POINT`.  We work
around this problem by falling back to `GetFileInformationByHandle()`
if that happens, but only if the reparse point is reported as cloud
reparse point, and only if PHP is running on Windows 1903 or later.

The patch has been developed in collaboration with ab@php.net.

We should keep an eye on the somewhat quirky OneDrive behavior, since
it might change again in a future Windows release.
2019-08-19 19:55:35 +02:00
Nikita Popov
be7e819068 Fixed bug #77922
In PHP 7.3 shadow properties are no longer duplicated. Make sure we
only release them if the property was defined on the parent class,
which means that it changed from private->shadow, which is where
duplication does happen.
2019-08-17 10:58:54 +02:00
Sara Golemon
9b9814fa77
Revert "Move to non deprecated API on suitable ICU versions"
This reverts commit 13a2f2d041.

The APIs used by this commit aren't entirely equivalent to the original ones.
2019-08-16 11:39:05 -04:00
Christoph M. Becker
4966647443 Update NEWS
This fix has been cherry-picked into PHP-7.3.9.
2019-08-15 15:28:52 +02:00
Nikita Popov
34885408db Fixed bug #78409
This removes an incorrect optimization (I think this code used to be
necessary to properly handle references in the Serializable based
implementation, but now this code just avoids an array duplication
in a way that is not sound).
2019-08-15 10:40:28 +02:00
Nikita Popov
1166359acb Merge branch 'PHP-7.2' into PHP-7.3 2019-08-14 17:51:35 +02:00
Nikita Popov
fcabe7e5e4 Fixed bug #78412
$this should only be included in the generator GC buffer, if it
will be released on destruction.
2019-08-14 17:50:58 +02:00
Sara Golemon
4b64d47c99
Bump for 7.2.23 2019-08-13 19:32:12 -04:00
Christoph M. Becker
5536105b67 Next will be 7.3.10 2019-08-13 23:57:48 +02:00
Nikita Popov
d891b5f458 Fixed bug #78410 2019-08-13 20:23:56 +02:00
Nikita Popov
60a7e60b61 Fixed bug #72530
For objects with destructors, we will now only call the destructor
in the initial GC run, and remove any nested data. The object is
marked purple so it will be considered a root for the next GC run,
at which point it will be fully destroyed, if possible.

GC counts change on a number of tests, as the objects now get
destroyed later.
2019-08-13 14:53:53 +02:00
Nikita Popov
a33361a37c Merge branch 'PHP-7.2' into PHP-7.3 2019-08-13 11:22:41 +02:00
Nikita Popov
4eeb41d1ea Fixed bug #77191 2019-08-13 11:19:58 +02:00
Nikita Popov
b01824e596 Fixed bug #78406 2019-08-13 10:22:32 +02:00
Nikita Popov
a18ad194c4 Fixed bug #78396 2019-08-12 10:45:13 +02:00
Nikita Popov
699b465da2 Fixed bug #78391 2019-08-09 15:03:40 +02:00
Nikita Popov
fc17bfaacf Fixed bug #78383 2019-08-08 09:55:52 +02:00
Dmitry Stogov
720438c8ee Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78379 (Cast to object confuses GC, causes crash)
2019-08-08 10:07:39 +03:00
Dmitry Stogov
bff2743caf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78379 (Cast to object confuses GC, causes crash)
2019-08-08 10:05:59 +03:00
Dmitry Stogov
358379be22 Fixed bug #78379 (Cast to object confuses GC, causes crash) 2019-08-08 10:00:39 +03:00
Christoph M. Becker
9ea39d15ab Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78282: atime and mtime mismatch
2019-08-06 17:28:11 +02:00
Christoph M. Becker
954543cec6 Fix #78282: atime and mtime mismatch
The fix for bug #78241 assumed that `time_t` would always be 64bit, but
actually is 32bit for x86.  We therefore enforce 64bit arithmetic to
avoid wrapping.

(cherry picked from commit bf242d58e7)
2019-08-06 17:25:54 +02:00
Derick Rethans
2811e924d1 Update NEWS for 7.4.0beta3 2019-08-06 06:55:20 +00:00
Derick Rethans
6da7f015e1 Update NEWS for PHP 7.4.0beta2 2019-08-06 06:54:01 +00:00
Dmitry Stogov
3fc0e2bb80 Fixed bug #78376 (Incorrect preloading of constant static properties) 2019-08-05 22:55:06 +03:00
Christoph M. Becker
f12dc90e5e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78346: strip_tags no longer handling nested php tags
2019-08-02 17:04:36 +02:00
Christoph M. Becker
a87ef5e3dd Fix #78346: strip_tags no longer handling nested php tags
When the strip tags state machine has been flattened, an if statement
has mistakenly been treated as else if.  We fix this, and also simplify
a bit right away.
2019-08-02 17:03:20 +02:00
Christoph M. Becker
e60c507362 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78179: MariaDB server version incorrectly detected
2019-08-02 16:45:29 +02:00
Christoph M. Becker
81efd489db Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78179: MariaDB server version incorrectly detected
2019-08-02 16:44:15 +02:00
Christoph M. Becker
f9f4a68368 Fix #78179: MariaDB server version incorrectly detected
As of MariaDB 10.0.2, the server reports a fake version number as work-
around for replication issues[1].  We apply the same "fix" as in the
MariaDB client to cater to this.

[1] <c50ee6c23d (diff-5b45fa673c88c06a9651c7906364f592)>
2019-08-02 16:42:49 +02:00
Nikita Popov
d89157cd67 Add test for bug #78363 2019-08-02 10:37:44 +02:00
Nikita Popov
85e8ccd55e Fixed bug #78363 2019-08-02 10:35:24 +02:00
Nikita Popov
bab8b3a8be Add test for bug #78356 2019-08-01 10:10:28 +02:00
Christoph M. Becker
1f9a77baef Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix 78213: Empty row pocket
2019-07-31 18:08:05 +02:00
Christoph M. Becker
8af14024c2 Fix 78213: Empty row pocket
We have to ensure that we don't create an arena which is smaller than
its header, regardless of the configured alignment.
2019-07-31 18:05:40 +02:00
Peter Kokot
3e8774e57a Update NEWS 2019-07-30 22:09:00 +02:00
Christoph M. Becker
8413df5e55 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add security related NEWS entries [ci skip]
2019-07-30 09:51:37 +02:00
Christoph M. Becker
ef439abd46 Add security related NEWS entries [ci skip] 2019-07-30 09:49:39 +02:00
Remi Collet
b29ecec4ef add security NEW entries + reorder [ci skip] 2019-07-30 09:26:50 +02:00
Nikita Popov
536c91c535 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-29 17:34:37 +02:00
Nikita Popov
44fe025c28 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-29 17:34:16 +02:00
Albert Casademont
dc7aa22b18 Fix bug #78326
Similar to what fread() does, truncate the stream_get_contents()
result if the original buffer was way too large.
2019-07-29 17:33:57 +02:00
Christoph M. Becker
76683ea999 Update NEWS [ci skip]
The fix has been cherry-picked into PHP-7.3.8, so the bug will be fixed
already there.
2019-07-29 14:48:23 +02:00
Nikita Popov
a22a06c351 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-29 13:03:53 +02:00
Nikita Popov
8e63bb5e46 Fixed bug #78341
The smart branch logic assumed b->start refers to the old offsets,
while b->start was already adjusted to the new offsets at this
point. Delay the change until later.
2019-07-29 13:02:01 +02:00
Nikita Popov
68fd435ba8 Fixed bug #78333
Don't dereference float/double values at unknown address, instead
memcpy it into an aligned stack slot and dereference that.
2019-07-29 11:27:21 +02:00
Nikita Popov
2eb159d589 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-29 11:26:31 +02:00
Nikita Popov
727929765b Merge branch 'PHP-7.2' into PHP-7.3 2019-07-29 11:26:09 +02:00
Nikita Popov
d142dfc93d Fixed bug #78333
Don't dereference float/double values at unknown address, instead
memcpy it into an aligned stack slot and dereference that.
2019-07-29 11:25:27 +02:00
Nikita Popov
4ae807e84e Fixed bug #78344
When performing a constant visibility check during compilation we
might be dealing with unlinked classes and as such should account
for the possibility of unresolved parents.
2019-07-29 11:12:00 +02:00
Nikita Popov
9bfda013d3 Fixed bug #78340
Even if we know the file size, we still need to read in a loop in
case the read call returns an incomplete result.

This was less of an issue previously because we did not use the
"one large read" approach for non-plain stream wrappers.
2019-07-29 10:07:12 +02:00
Christoph M. Becker
fec71e3f25 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78342: Bus error in configure test for iconv //IGNORE
2019-07-29 08:51:33 +02:00
Christoph M. Becker
585131f901 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78342: Bus error in configure test for iconv //IGNORE
2019-07-29 08:50:39 +02:00
Christoph M. Becker
30eb4b3563 Fix #78342: Bus error in configure test for iconv //IGNORE
We have to check the return value of iconv_open() for error, to avoid
that and potentially other undesired behavior of iconv().
2019-07-29 08:48:13 +02:00
Matteo Beccati
5d3d2b9827 Addded missing NEWS/UPGRADING entries for PDO "??" escape 2019-07-25 16:30:28 +02:00
Derick Rethans
126dd8e1eb Update NEWS for 7.4.0beta2 2019-07-24 09:39:54 +00:00
Derick Rethans
5dae0eae62 Update NEWS for PHP 7.4.0beta1 2019-07-24 09:38:35 +00:00
Derick Rethans
a07e85f93f Update NEWS for 7.4.0beta2 2019-07-23 08:06:23 +00:00
Derick Rethans
2b540b2f52 Update NEWS for PHP 7.4.0beta1 2019-07-23 08:05:05 +00:00
Peter Kokot
1fa238a7b3 Update NEWS 2019-07-23 02:32:38 +02:00
Peter Kokot
b42a13b08a Update NEWS 2019-07-23 02:13:36 +02:00
Peter Kokot
8f384bea93 Update NEWS 2019-07-23 02:13:00 +02:00
Nikita Popov
845d07b343 Add upgrading entries
[ci skip]
2019-07-22 17:56:16 +02:00
Maksim Nikulin
bdf24f8d6d Prevent use after free in fpm_event_epoll_wait
epoll event backend does not guarantee that child input/output events
are reported before SIGCHILD due to finished worker. While a bunch of
events received by epoll is being processed, child-related structures
may be removed before dispatching of an I/O event for the same child.
The result may be attempt to access to memory region allocated for
another purpose, segfault of the master process, and unavailable web
sites.

Postpone processing of SIGCHILD events till other events in the same
bunch are processed.

Fix Bug #62418 php-fpm master process crashes
Fix Bug #65398 Race condition between SIGCHLD and child stdout/stderr event leads to segfault
Fix Bug #75112 php-fpm crashing, hard to reproduce
Fix Bug #77114 php-fpm master segfaults in fpm_event_epoll_wait/fpm_event_fire
Fix Bug #77185 Use-after-free in FPM master event handling
2019-07-22 10:32:58 +02:00
Remi Collet
a85e4d5336 Fixed bug #78314 (missing freetype support/functions with external gd) 2019-07-20 07:57:13 +02:00
Nikita Popov
4a9f78f9d7 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-18 14:41:35 +02:00
Abyr Valg
c8c183eb62 Fixed bug #77946
Save multi_info_read() result into easy handle.
2019-07-18 14:40:47 +02:00
Christoph M. Becker
3f23380361 Update NEWS and UPGRADING wrt. opcache.cache_id [ci skip] 2019-07-18 09:16:56 +02:00
Nikita Popov
79efd55fc3 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-17 15:59:14 +02:00
Nikita Popov
b864abfe23 Fixed bug #69100 2019-07-17 15:58:29 +02:00
Nikita Popov
5161cebe28 Fix bug #52752 by not using mmap() to lex files
Using mmap() is unsafe under concurrent modification. If the file
is truncated, access past the end of the file may occur, which will
generate a SIGBUS error. Even if the length does not change, the
contents may, which is a situation that the lexer certainly is not
prepared to deal with either.

Reproduce with test.php:

    <?php
    file_put_contents(__DIR__ . '/test.tpl',
        'AAA<?php $string = "' .
        str_repeat('A', mt_rand(1, 256 * 1024)) .
        '"; ?>BBB' . "\r\n");
    require_once __DIR__ . '/test.tpl';

And:

    for ((n=0;n<100;n++)); do sapi/cli/php test.php & done
2019-07-16 15:47:10 +02:00
Christoph M. Becker
956ecc2ce5 Update NEWS [ci skip] 2019-07-16 13:44:13 +02:00
Remi Collet
bd0514913b move NEWS entry [ci skip] 2019-07-16 13:00:13 +02:00
Nikita Popov
eea9d61763 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-16 11:10:51 +02:00
Nikita Popov
8a19fe29de Fixed bug #78297 2019-07-16 11:09:17 +02:00
Remi Collet
c9037421ac next is 7.2.22 2019-07-16 10:38:20 +02:00
Nikita Popov
c5f1b384b5 Move shebang handling into the lexer
Instead of handling shebang lines by adjusting the file pointer in
individual SAPIs, move the handling into the lexer, where this is
both a lot simpler and more robust. Whether the shebang should be
skipped is controlled by CG(skip_shebang) -- we might want to do
that in more cases.

This fixed bugs #60677 and #78066.
2019-07-15 16:25:49 +02:00
Nikita Popov
2d737a1e4b Merge branch 'PHP-7.2' into PHP-7.3 2019-07-15 15:20:15 +02:00
Nikita Popov
88ffe05797 Fix bug #77124
This is a backport of 6fcae63f61
to PHP 7.2.
2019-07-15 15:19:31 +02:00
Remi Collet
ad48464ec2 typo [ci skip] 2019-07-15 14:17:13 +02:00
Remi Collet
a7ff3a6483 Fix #78269 password_hash uses weak options for argon2 2019-07-15 14:11:30 +02:00
Remi Collet
eab0079c90 Fix #78269 password_hash uses weak options for argon2 2019-07-15 14:10:38 +02:00
Nikita Popov
3eb057c4a7 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-15 10:23:51 +02:00
Andrew Collington
768ad70f70 Fix bug #78291 Missing opcache directives
New opcache directives have been added recently which are returned
if using `ini_get_all('zend opcache')` but are not listed in the
directives if using `opcache_get_configuration()`.  This fix adds
those missing directives as well as if `opcache.mmap_base` is used
instead of `opcache.lockfile_path`.  Also adds a test to ensure the
directives match with both methods of fetching.
2019-07-15 10:22:47 +02:00
Peter Kokot
f573ba1948 Update changelogs
- PHP-7.4 alpha, beta, RC versions already include bugs logged in the
  NEWS
- some links to RFCs
- php_error_docref0
2019-07-13 15:37:36 +02:00
Christoph M. Becker
bf242d58e7 Fix #78282: atime and mtime mismatch
The fix for bug #78241 assumed that `time_t` would always be 64bit, but
actually is 32bit for x86.  We therefore enforce 64bit arithmetic to
avoid wrapping.
2019-07-13 09:44:46 +02:00
Nikita Popov
9d141f9889 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-12 16:30:33 +02:00
Nikita Popov
4a91f66b8f Fixed bug #78279
Even if we don't initialize the callback on every request, we
should still reset our globals to default values...
2019-07-12 16:29:18 +02:00
Christoph M. Becker
76783a9bcc Update NEWS and UPGRADING wrt. ext/recode unbundling 2019-07-12 14:35:44 +02:00
Christoph M. Becker
17997a908d Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78212: Segfault in built-in webserver
2019-07-11 13:11:08 +02:00
Christoph M. Becker
fa65f5ecf5 Fix #78212: Segfault in built-in webserver
Since syslog's ident and facility parameters have been added to
config[1], vsyslog() segfaults on Windows, if openlog() has not been
called before.  We bring back the removed lines to fix this.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=2475337bd8a0fad0dac03db3f5e7e9d331d53653>
2019-07-11 13:09:54 +02:00
Nikita Popov
e7a83ec8df Fix bug #78271
When cleaning nops in the dfa pass, we were always keeping the
smart branch inhibiting nop that occurs directly before the jump
instruction. However, as we skip unreachable blocks entirely, it
may happen that we need to keep a nop that occurs further back,
prior to the unreachable blocks. Account for that case now.

We should really do something about the smart branch situation,
this is very fragile...
2019-07-10 17:25:40 +02:00
Christoph M. Becker
7404d756e9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Upgrade to SQLite 3.28.0
2019-07-09 10:04:41 +02:00
Christoph M. Becker
40f7533cc1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Upgrade to SQLite 3.28.0
2019-07-09 10:02:47 +02:00
Christoph M. Becker
e944ae6b2a Upgrade to SQLite 3.28.0
Over the years, multiple security vulnerabilities[1] have been found
and fixed in SQLite3, so it makes sense to update our bundled libsqlite
to the latest available version.

[1] <https://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html>
2019-07-09 09:59:46 +02:00
Derick Rethans
086b476c27 Update NEWS for 7.4.0beta1 2019-07-09 07:41:09 +00:00
Derick Rethans
3fd7c478a5 Update NEWS for PHP 7.4.0alpha3 2019-07-09 07:39:49 +00:00
Peter Kokot
e180290a1e Update NEWS [ci skip] 2019-07-08 18:50:59 +02:00