1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Commit Graph

60394 Commits

Author SHA1 Message Date
Christoph M. Becker
2e65c8e581 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81500: Interval serialization regression since 7.3.14 / 7.4.2
2021-10-15 19:13:38 +02:00
Christoph M. Becker
fc886694d3 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81500: Interval serialization regression since 7.3.14 / 7.4.2
2021-10-15 19:11:26 +02:00
Christoph M. Becker
866adb122a Fix #81500: Interval serialization regression since 7.3.14 / 7.4.2
While it may not be desired, `DateInterval::$f` supports negative
values, at least with regard to calculations.  We still need to guard
from assigning double values which are out of range for signed 64bit
integers (which would be undefined behavior).  zend_dval_to_lval() does
this by returning `0` instead of triggering UB.  This way we can avoid
setting the invalid marker, which doesn't work as expected anyway.

We must not do that only for unserialization, but also when the property
is set in the first place.

We need to adapt some of the existing tests wrt. this behavior.  In
particular, we check for an arbitrary value in bug79015.phpt, to cater
to differences between 32bit and 64bit architectures.

Closes GH-7575.
2021-10-15 19:08:07 +02:00
Dmitry Stogov
f8b1853816 Tracing JIT: propagete op1 type info of FETCH_DIM_FETCH_ARG in read mode 2021-10-15 15:36:27 +03:00
Dmitry Stogov
af0a980f45 Tracing JIT: Use information about really called internal function return type to improve type inference. 2021-10-15 12:30:16 +03:00
Dmitry Stogov
88982a1d20 JIT: Use more general type guard to prevent useless trace splitting 2021-10-14 23:55:35 +03:00
Máté Kocsis
d98634e652 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix 2nd param name of pg_send_execute()
2021-10-13 14:19:54 +02:00
Máté Kocsis
ca219d7d27 Fix 2nd param name of pg_send_execute()
Closes GH-7576
2021-10-13 14:14:47 +02:00
Dmitry Stogov
28cca5d451 JIT: Fixed incorrect FETCH_OBJ_W code for typed property (ARM64 part) 2021-10-13 14:51:34 +03:00
Dmitry Stogov
afeadc668b JIT: Fixed incorrect FETCH_OBJ_W code for typed property 2021-10-13 14:48:06 +03:00
Remi Collet
8cfd7e2105 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  bump zip ext version
2021-10-13 11:53:25 +02:00
Remi Collet
6d0d5227d8 bump zip ext version 2021-10-13 11:53:02 +02:00
Nikita Popov
c5e030f3aa Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug #81521
2021-10-12 16:43:24 +02:00
Nikita Popov
53f89219ab Fix bug #81521
The current error message is incorrect -- the problem here is not
that the property is invalid, but that these methods are unusable
prior to loading data, same as read().
2021-10-12 16:42:32 +02:00
Dmitry Stogov
da05c0a84f JIT: Avoid generation of unused exit point for conditional braches with NULL/FALSE/TRUE operand 2021-10-12 16:57:33 +03:00
Nikita Popov
9ebe8494b8 Don't replace tmp with cv in YIELD argument
For by-ref generators, these may have different behavior.

Fixes oss-fuzz 6059739298004992.
2021-10-12 14:26:53 +02:00
Christoph M. Becker
5356d06990 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81424: PCRE2 10.35 JIT performance regression
2021-10-12 14:22:52 +02:00
Christoph M. Becker
845a67feb5 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81424: PCRE2 10.35 JIT performance regression
2021-10-12 14:21:09 +02:00
Christoph M. Becker
788a701e22 Fix #81424: PCRE2 10.35 JIT performance regression
We backport the respective upstream fix[1] to our bundled pcre2lib plus
the follow-up fix[2] for a functional regression.

[1] <dc5f966635>
[2] <e7af7efaa1>

Closes GH-7573.
2021-10-12 14:19:22 +02:00
Máté Kocsis
220f0f55cf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix the return type of imagecolorexactalpha()
  String default values are enclosed in quotes rather than apostrophes
2021-10-12 09:53:30 +02:00
Máté Kocsis
2127b49c65 String default values are enclosed in quotes rather than apostrophes 2021-10-12 09:51:20 +02:00
Máté Kocsis
17fa9b77bd Fix the return type of imagecolorexactalpha() 2021-10-12 09:51:13 +02:00
Hao Sun
582e21fbda Reduce threshold further in ext/date/tests/bug73837.phpt
The threshold in test case ext/date/tests/bug73837.phpt has been reduced
several times, from the original 990 to current 400. However, this case
still failed on my local test with Mac Mini machine(macOS on Apple
silicon). Here is the diff result:

```
  $ cat ext/date/tests/bug73837.diff
     int(%d)
  002+ microseconds do not differ enough (268)
  002- microseconds differ
```

Hence this patch reduces the threshold further.

Note that this patch should be backported to PHP 8.1 branch as well.

Closes GH-7567.
2021-10-12 00:49:21 +00:00
Dmitry Stogov
1208fe932a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed type inference for COPY_TMP
2021-10-11 16:56:40 +03:00
Dmitry Stogov
a4c41d45cd Fixed type inference for COPY_TMP 2021-10-11 16:56:07 +03:00
Dmitry Stogov
912f040583 JIT: Fixed incorrect deoptimization info 2021-10-11 14:10:02 +03:00
Nikita Popov
f0cf999223 Preserve key/value type invariant in range() type inference
Don't set PACKED key type if no value type is set.

Fixes oss-fuzz 6718410667458560.
2021-10-11 12:41:46 +02:00
Nikita Popov
fabcc9a350 Fix long-term shutdown/tick fci/fcc storage
Normally incrementing the refcount on just function_name is
sufficient. However, if the callable is of the form 'X::y' inside
an instance method, this will capture $this in fcc.object, which
also needs to be retained.

The fci_addref/fci_release helpers should likely be exported as
a general API, as we may have this problem in other places as
well.

Fixes oss-fuzz #39778.
2021-10-11 12:19:29 +02:00
Dmitry Stogov
bbe21365b4 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed usage of incorrect specialized zval destructor
2021-10-11 13:02:45 +03:00
Dmitry Stogov
ccdda69a18 JIT: Fixed usage of incorrect specialized zval destructor 2021-10-11 13:00:23 +03:00
Dmitry Stogov
04064187c2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed type inference (ASSIGN_OP with typed reference may cause type conversion)
2021-10-11 10:50:06 +03:00
Dmitry Stogov
ed8ec9d71e Fixed type inference (ASSIGN_OP with typed reference may cause type conversion) 2021-10-11 10:48:49 +03:00
Nikita Popov
d001682ac4 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed bug #81494
2021-10-08 15:02:29 +02:00
Nikita Popov
df940a6dc3 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #81494
2021-10-08 15:00:51 +02:00
Nikita Popov
fcabe693ba Fixed bug #81494
Use the proper error reporting mechanism rather than throwing a
warning. This requires something of a hack because we don't have
direct access to the connection object at this point.
2021-10-08 15:00:10 +02:00
Derick Rethans
7af0bf4d07 Merge branch 'PHP-8.0' into PHP-8.1 2021-10-08 13:52:34 +01:00
Derick Rethans
b230593b0e Merge branch 'PHP-7.4' into PHP-8.0 2021-10-08 13:52:18 +01:00
Derick Rethans
9733d49e14 Remove now superfluous tests due to changes in tzdata 2021-10-08 13:51:21 +01:00
Dmitry Stogov
30f1f4b75b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed incorrect double/long register hinting
2021-10-08 15:47:21 +03:00
Dmitry Stogov
bbd875268a JIT: Fixed incorrect double/long register hinting 2021-10-08 15:46:49 +03:00
Nikita Popov
7f0d3f5413 Fixed bug #81502
Allow $tag to be null. This is the value that openssl_encrypt()
sets it to for non-AEAD ciphers, so we should also accept this
as an input to openssl_decrypt().

Prior to PHP 8.1, null was accepted in weak mode due to the special
treatment of null arguments to internal functions.
2021-10-08 14:07:05 +02:00
Derick Rethans
7ad877ced1 Updated to version 2021.3 (2021c) 2021-10-08 12:54:54 +01:00
Derick Rethans
c55b41d658 Updated to version 2021.3 (2021c) 2021-10-08 12:54:53 +01:00
Derick Rethans
8a61f1ece6 Updated to version 2021.3 (2021c) 2021-10-08 12:54:52 +01:00
Dmitry Stogov
26bc7b38fb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed extension handling
2021-10-08 14:08:34 +03:00
Dmitry Stogov
b279de416e JIT: Fixed extension handling 2021-10-08 14:06:32 +03:00
Dmitry Stogov
b2c43a4efb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Flush error messages emitted during preloading
2021-10-08 12:35:38 +03:00
Dmitry Stogov
45b127ad4a Flush error messages emitted during preloading 2021-10-08 12:34:25 +03:00
Dmitry Stogov
c9fb384c40 JIT ARM64: Use proper register 2021-10-08 09:56:44 +03:00
Dmitry Stogov
d12d987686 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed FETCH_LIST_R on string
2021-10-07 22:15:30 +03:00