Commit Graph

121657 Commits

Author SHA1 Message Date
Nikita Popov
32cd5a1bc8 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Next attempt to fix bug #80368
2020-11-30 15:17:27 +01:00
Nikita Popov
ecee3f1209 Next attempt to fix bug #80368
Apparently treating LibreSSL as OpenSSL 1.1 is not just something
we did in our code, it's something that upstream LibreSSL claims,
despite not actually being compatible. Duh.

Check for EVP_CIPH_OCB_MODE instead, which should reliably
determine support...
2020-11-30 15:15:59 +01:00
George Peter Banyard
0076b47326 Fix Bug #80438: imap_msgno() incorrectly warns and return false on valid UIDs in PHP 8.0.0
Checking for a valid Unique ID (UID) cannot use the convenience macro as they might
be larger than the message number which has for maximum value the total number of
current messages available in the mailbox.
2020-11-30 14:08:31 +00:00
George Peter Banyard
a55402d07c Rename XmlParser to XMLParser for consistency with XMLWriter/XMLReader 2020-11-30 14:08:31 +00:00
Nikita Popov
24a19cc232 Suppress stream errors in mysqlnd
mysqlnd currently sets error_reporting=0 to suppress errors while
writing to streams. Unfortunately these errors are still visible
to userland error handlers, which is a source of confusion.
See for example https://bugs.php.net/bug.php?id=80412.

Instead add a stream flag that suppresses the emission of
read/write errors in the first place, and set it in mysqlnd.

I think it might be useful to have this option for userland as
well in the future, but for now this is just an internal
mechanism.

Closes GH-6458.
2020-11-30 15:06:28 +01:00
Dmitry Stogov
a0baa09b99 Hide phpdbg/JIT incompatibility macro (JIT is disabled for phpdbg) 2020-11-30 16:42:17 +03:00
Nikita Popov
4643c0aac5 Add additional entries to unserialize corpus
These are useful to seed typed property fuzzing.
2020-11-30 14:32:07 +01:00
Nikita Popov
ed9532cff0 Fix another ref source management bug in unserialize
When we overwrite an existing property during unserialization,
we also have to drop the ref source from it.
2020-11-30 14:23:54 +01:00
Christoph M. Becker
666833b238 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #76813: Access violation near NULL on source operand
2020-11-30 12:33:13 +01:00
Christoph M. Becker
5e15c9c41f Fix #76813: Access violation near NULL on source operand
We avoid `YYCURSOR` becoming `NULL` by initializing `YYMARKER`, and add
a default rule for `<NORMAL>` where we catch unexpected input.

We also fix the only superficially related issue regarding empty input
followed by `T_SEPARATOR` and command, which caused another segfault.

Closes GH-6464.
2020-11-30 12:29:24 +01:00
Dmitry Stogov
d5a82e2c4e Disable JIT with incompatible third-party extensions 2020-11-30 13:58:34 +03:00
Nikita Popov
15073d8e1d Fixed bug #80437
Only chmod if the file has been created.
2020-11-30 11:40:46 +01:00
Nikita Popov
fdb05b92bf Only replace IN_ARRAY result type for JMPZ/JMPNZ
Replacing the result type in the general case is dangerous,
because not all opcodes support both VAR and TMP. One common case
is the in_array() result being passed to SEND_VAR, which would
have to be changed to SEND_VAL.

Rather than complicating this logic, reduce the scope to only
doing the type replacement for JMPZ and JMPNZ. The only reason
we're doing this in the first place is to enable the smart branch
optimization, so we can limit it to the relevant opcodes. Replacing
the result type may be marginally useful in other cases as well
(as it may avoid reference checks), but not worth the bother.
2020-11-30 11:18:21 +01:00
Nikita Popov
e77ac88a44 Use ephemeral ports in mcast_ipv*_recv.phpt 2020-11-30 09:49:39 +01:00
Christoph M. Becker
44ccccdfb8 tidy::repairFile() and ::repairString() return string|false 2020-11-30 00:29:10 +01:00
Nikita Popov
5b3809e942 Respect strict_types during sccp function call evaluation
Similar to what we do with attributes, add a dummy call frame
on which we can set the strict_types flag.
2020-11-27 20:24:00 +01:00
Nikita Popov
0ce9b5f755 Don't check for throwing calls in sccp function evaluation
We only need to reject functions that could warn (or have runtime
dependent behavior). If a function can throw in some cases, just
let it and discard the result.
2020-11-27 17:49:51 +01:00
Nikita Popov
a505fc627e Fix handling of sccp exceptions
We should clear the exception *before* we destroy the execute_data.
Add a variation of the test that indirects through another file,
and would crash otherwise.
2020-11-27 17:44:30 +01:00
Jakub Zelenka
a87d620543 Merge branch 'PHP-7.4' into PHP-8.0 2020-11-27 16:35:16 +00:00
Jakub Zelenka
b855907f54 Merge branch 'PHP-7.3' into PHP-7.4 2020-11-27 16:33:47 +00:00
Jakub Zelenka
685708160e Fix test for bug62890 to not depend on system cert store 2020-11-27 16:32:43 +00:00
Nikita Popov
08919578ca Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix build for non-x86
2020-11-27 17:04:50 +01:00
Nikita Popov
3430d856ac Fix build for non-x86 2020-11-27 17:04:17 +01:00
Nikita Popov
e5aae35855 Handle exceptions during SCCP function evaluation
Easier to handle them than to ensure they can't happen in the
first place.
2020-11-27 17:00:12 +01:00
Nikita Popov
4f3cf983dc Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix AVX detection
2020-11-27 14:49:45 +01:00
Nikita Popov
4e30ab33d8 Fix AVX detection
Our CPU detection code currently only checks whether hardware
support for AVX exists. However, we also need to check for operating
system support for XSAVE, as well as whether XCR0 has the SSE and
AVX bits set.

If this is not the case, unset the AVX and AVX2 bits in the cpuinfo
structure.

Hopefully this resolves our issues with CPU support detection.

Closes GH-6460.
2020-11-27 14:49:31 +01:00
Nikita Popov
8b281e5b6b Only use travis for cron jobs
Our primary CI has been Azure Pipelines for a while now already.
Travis was primarily retained as a) a fast feedback builder and
b) to test architectures not available elsewhere.

Due to Travis CI open source policy changes, Travis is no longer
useful as a fast feedback builder. As such, only use it for cron
job builds.
2020-11-27 14:15:34 +01:00
Nikita Popov
8e25cf26af Make sure zend_cpu_supports_pclmul() is always defined
If __builtin_cpu_supports() is available, but doesn't have support
for pclmul, the function would end up not being defined at all.
2020-11-27 12:22:03 +01:00
Christoph M. Becker
bcefbf8602 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix mysqli_get_client_stats test
2020-11-27 11:51:30 +01:00
Christoph M. Becker
07c5efbd76 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix mysqli_get_client_stats test
2020-11-27 11:50:59 +01:00
Daniel Black
4a10037cb4 Fix mysqli_get_client_stats test
MySQL removed RENAME DATABASE in 18300001c1dbbfddf9a0adcbaeea68956102bdd0
(Sept 2007, 5.1.23). As this briefest existance is very insignificant lets remove it.

It also breaks when testing against MariaDB.

As the alternate path in this test covers all supported MySQL and MariaDB
versions and a signifant portion of unsupported versions lets keep it simple.

Closes GH-6459.
2020-11-27 11:43:34 +01:00
Nikita Popov
2772f7c3ad Avoid direct calls to zend_cpu_supports()
While the use of zend_cpu_supports_*() is only strictly necessary
inside ifunc resolvers, where the cpu state has not been initialized
yet, we should prefer the compiler builtins in all cases.
2020-11-27 11:18:10 +01:00
Nikita Popov
f35b194029 Assert that cpuinfo is initialized before use
And fix some incorrect indentation.
2020-11-27 11:14:07 +01:00
Nikita Popov
4a7ebb6d83 Move avx check into a macro 2020-11-27 11:06:05 +01:00
Nikita Popov
f4e1768e21 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #80368
2020-11-27 10:58:34 +01:00
Nikita Popov
0f579fd7c8 Fixed bug #80368
We assume that usually LibreSSL supports everything OpenSSL 1.1 does.
In this instance, this is not the case.
2020-11-27 10:57:19 +01:00
Nikita Popov
48ff654fb9 Fixed bug #80433
Use ZEND_STRTOL to allow leading zeros in opcache.jit option.
2020-11-27 10:51:57 +01:00
Nikita Popov
c61390cfb4 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #80425
2020-11-27 10:03:21 +01:00
Nikita Popov
5240f8391f Fixed bug #80425
Rename the methods in MessageFormatAdapter to make sure they don't
clash with anything defined by icu itself, which may be a problem
if icu is linked statically.
2020-11-27 10:02:00 +01:00
Christopher Jones
a9c44d1b5a Update PECL package release date 2020-11-27 10:17:37 +11:00
Christoph M. Becker
49e1ed1941 Fix bug number 2020-11-26 23:34:35 +01:00
Dmitry Stogov
3697648be5 Eliminate deafd stores 2020-11-26 21:05:07 +03:00
Nikita Popov
6132389d1c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix bug #80402: Don't strip -lpthread
2020-11-26 11:56:00 +01:00
Nikita Popov
ea372e7463 Fix bug #80402: Don't strip -lpthread
The current behavior has been introduced 20 years ago in
f9e375f493 as part of a larger change.
It's not clear to me why special treatement of -lpthread is necessary
here.
2020-11-26 11:54:20 +01:00
Sara Golemon
c65f0c7aca
Remove -dev from ZEND_VERSION 2020-11-26 02:19:51 +00:00
Nikita Popov
306555e11d Add UPGRADING note for PDO::inTransaction()
[ci skip]
2020-11-25 17:28:23 +01:00
Nikita Popov
217f247bb5 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #80411
2020-11-25 17:24:49 +01:00
Nikita Popov
2fb12be84c Fixed bug #80411
References to null-serializations are stored as null, and as such
are part of the reference count.

Reminds me that we really need to deprecate the mess that is
Serializable.
2020-11-25 17:23:42 +01:00
Nikita Popov
f5b93626a6 Fix unserialization ref source management, again
Handle one case the previous patch did not account for: If
unserialization of data fails, we should still register a ref
source.

Also add an extra test for a reference between two typed properties,
as this used to be handled incorrectly earlier.
2020-11-25 17:04:07 +01:00
Nikita Popov
518eb0ca2b Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed error reporting in mysqli_stmt::__construct
2020-11-25 16:29:00 +01:00