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

60629 Commits

Author SHA1 Message Date
Dmitry Stogov
dd2c30a97e Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix register clobbering
2021-12-03 11:14:54 +03:00
Dmitry Stogov
2515e788bc JIT: Fix register clobbering
Fixes oss-fuzz #41621
2021-12-03 11:13:50 +03:00
Christoph M. Becker
59dd4fd742 Fix #81681: ReflectionEnum throwing exceptions
Enums are neither instantiable nor cloneable.

Closes GH-7707.
2021-12-02 23:22:07 +01:00
Dmitry Stogov
9a3ca278b3 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed Zend/tests/str_offset_008.phpt failure
2021-12-02 23:55:33 +03:00
Dmitry Stogov
c4ee66856e Tracing JIT: Fixed Zend/tests/str_offset_008.phpt failure 2021-12-02 23:47:36 +03:00
Dmitry Stogov
42a162e535 Add test 2021-12-02 22:50:55 +03:00
Dmitry Stogov
b4680b056c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix ASSIGN_DIM_OP with undefined variable and index and user error handler, throwing an exception
2021-12-02 22:24:06 +03:00
Dmitry Stogov
2fde308fc6 JIT: Fix ASSIGN_DIM_OP with undefined variable and index and user error handler, throwing an exception
Fixes oss-fuzz #39422
2021-12-02 22:19:48 +03:00
Dmitry Stogov
ddcfffad2c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix yet another indirect string modification by error handler problem
2021-12-02 16:17:26 +03:00
Dmitry Stogov
94286cd596 Fix yet another indirect string modification by error handler problem 2021-12-02 16:16:54 +03:00
Dmitry Stogov
b9ff359a99 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Add missing zend_string_release_ex(tmp, 0) and cleanup
2021-12-02 11:21:04 +03:00
Dmitry Stogov
37ac707cac Add missing zend_string_release_ex(tmp, 0) and cleanup
- use GC_DELREF() instead of zend_string_release_ex()
- add expectations for exceptional cases
- replace IS_ARRAY_IMMUTABLE by IS_STR_INTERNED
2021-12-02 11:18:08 +03:00
Dmitry Stogov
4eaba3e2ed Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed ext/bz2/tests/005.phpt test failure introduesed by 09547c64c2
2021-12-02 10:34:14 +03:00
Dmitry Stogov
df16da3697 Fixed ext/bz2/tests/005.phpt test failure introduesed by 09547c64c2 2021-12-02 10:32:45 +03:00
Dmitry Stogov
e833e5cfa0 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix clobering of operand by error handler in assignment to string offset (optimization and JIT support)
2021-12-02 01:20:48 +03:00
Dmitry Stogov
4595a57e99 Fix clobering of operand by error handler in assignment to string offset (optimization and JIT support) 2021-12-02 01:20:17 +03:00
Dmitry Stogov
b594a95a2f Fixed crash in ZEND_ASSIGN_DIM_OP because of array cloberring by user error handler
Fixes oss-fuzz #36214
2021-11-30 23:33:34 +03:00
Dmitry Stogov
07389566ac Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix incorrect code produced for BOOL_NOT and [double, undef] operand
2021-11-30 20:44:46 +03:00
Dmitry Stogov
e7b31f57ec JIT: Fix incorrect code produced for BOOL_NOT and [double, undef] operand
Fixes oss-fuzz #41531
2021-11-30 20:36:52 +03:00
Dmitry Stogov
3564001502 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix incorrect reference counting inference
2021-11-30 13:00:04 +03:00
Dmitry Stogov
c1036194d6 JIT: Fix incorrect reference counting inference
Fixes oss-fuzz #40747
2021-11-30 12:58:54 +03:00
Dmitry Stogov
005d5f4df8 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix uninitialized result of ASSIGN_DIM[_OP] after clobbering array by user error handler
2021-11-30 11:41:55 +03:00
Dmitry Stogov
6e1fe96962 JIT: Fix uninitialized result of ASSIGN_DIM[_OP] after clobbering array by user error handler
Fixes oss-fuzz #41208
2021-11-30 11:40:18 +03:00
Dmitry Stogov
3c3626a903 Restore line, removed by mistake in b914122389 2021-11-30 09:44:36 +03:00
Dmitry Stogov
2d3ea98624 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed type inference (it's safe to ignore reference counting narrowing)
2021-11-29 23:39:37 +03:00
Dmitry Stogov
86430e8e01 Fixed type inference (it's safe to ignore reference counting narrowing) 2021-11-29 23:32:52 +03:00
Dmitry Stogov
23c5a6fd16 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix exception handling when next array element is already occupied
2021-11-29 21:57:29 +03:00
Dmitry Stogov
aff115547f JIT: Fix exception handling when next array element is already occupied
Fixes oss-fuzz #41408
2021-11-29 21:44:00 +03:00
Christoph M. Becker
60717fcd34 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #74604: Out of bounds in php_pcre_replace_impl
2021-11-29 19:17:16 +01:00
Christoph M. Becker
816aa20391 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #74604: Out of bounds in php_pcre_replace_impl
2021-11-29 19:15:20 +01:00
Christoph M. Becker
712fc54e85 Fix #74604: Out of bounds in php_pcre_replace_impl
Trying to allocate a `zend_string` with a length only slighty smaller
than `SIZE_MAX` causes an integer overflow; we make sure that this
doesn't happen by catering to the maximal overhead of a `zend_string`.

Closes GH-7597.
2021-11-29 19:12:55 +01:00
Dmitry Stogov
b914122389 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix named arguments handling
  JIT: Fix named arguments handling
2021-11-29 18:43:24 +03:00
Dmitry Stogov
d955415114 JIT: Fix named arguments handling
Fixes oss-fuzz #41486
2021-11-29 18:39:50 +03:00
Dmitry Stogov
8f4cfe04eb JIT: Fix named arguments handling
Fixes oss-fuzz #41486
2021-11-29 18:37:49 +03:00
Christoph M. Becker
b0823438a9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81659: stream_get_contents() may unnecessarily overallocate
2021-11-29 14:50:19 +01:00
Christoph M. Becker
f3bd24a200 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81659: stream_get_contents() may unnecessarily overallocate
2021-11-29 14:48:11 +01:00
Christoph M. Becker
31749aac62 Fix #81659: stream_get_contents() may unnecessarily overallocate
Since we're going to read from the current stream position anyway, the
`max_len` should be the size of the file minus the current position
(still catering to potentially filtered streams).  We must, however,
make sure to cater to the file position being beyond the actual file
size.

While we're at, we also fix the step size in the comment, which is 8K.

A further optimization could be done for unfiltered streams, thus
saving that step size, but 8K might not be worth it.

Closes GH-7693.
2021-11-29 14:46:09 +01:00
Dmitry Stogov
c6e895aec2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Disable type narrowing optimization when we contruct SSA for JIT
2021-11-29 15:53:16 +03:00
Dmitry Stogov
297117bbc5 Disable type narrowing optimization when we contruct SSA for JIT
This also revets incorrect fix introduced in f9518c3850
2021-11-29 15:51:54 +03:00
Alex Dowad
1a2c608053 Add unit tests for mb_detect_encoding on Polish text 2021-11-26 17:42:53 +02:00
Dmitry Stogov
442304485e Fixed test (added 8.1 deprecation) 2021-11-25 22:40:26 +03:00
Dmitry Stogov
971354caac Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed use-after-free caused by shift by negative number
2021-11-25 22:24:15 +03:00
Dmitry Stogov
49f44e7ffc JIT: Fixed use-after-free caused by shift by negative number
Fixes oss-fuzz #41192
2021-11-25 22:21:44 +03:00
Christoph M. Becker
6008a75f39 Update to PCRE2 10.39
We also apply an respective upstream fix[1].

[1] <d144199dfb>

Closes GH-7678.
2021-11-25 18:38:31 +01:00
Christoph M. Becker
df5e95b4d1 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81649: imap_(un)delete accept sequences, not single numbers
2021-11-25 18:31:14 +01:00
Christoph M. Becker
179030d167 Fix #81649: imap_(un)delete accept sequences, not single numbers
As such, the parameter name `$message_num` is utmost misleading; it
should be `$message_nums` as for other functions.

Closes GH-7686.
2021-11-25 18:29:43 +01:00
Remi Collet
54f1f8cf2a add missing conditions 2021-11-25 13:20:27 +01:00
Remi Collet
f566cba0bb fix [-Wstrict-prototypes] build warnings in ext/gd 2021-11-25 13:17:07 +01:00
Dmitry Stogov
b1a1ed380f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed incorrect narrowing to double
2021-11-25 15:15:01 +03:00
Dmitry Stogov
f9518c3850 Fixed incorrect narrowing to double
Fixes oss-fuzz #41223
2021-11-25 15:14:04 +03:00