1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Commit Graph

123024 Commits

Author SHA1 Message Date
Dmitry Stogov 7b629afe4e Fixed incorrect DCE of a constructor call
Fixez oss-fuzz #42049
2021-12-06 15:59:30 +03:00
Dmitry Stogov c29f6baaee JIT: Fix incorrect elimination of type store
Fixes oss-fuzz #41995
2021-12-06 14:22:07 +03:00
Dmitry Stogov aa7280264e Fix refcount inferemce ($a += $a returns old array with RCN)
Fixes oss-fuzz #41670
2021-12-06 11:30:03 +03:00
Michael Wallner 1f38c003d2 fix #81656: GCC-11 silently ignores -R
Closes GH-7688.
2021-12-05 21:06:28 +01:00
Christoph M. Becker 582a291c98 Use php/php-sdk-binary-tools.git for AppVeyor builds 2021-12-05 13:51:50 +01:00
Dmitry Stogov c9901aa594 Add missing "return" 2021-12-03 13:52:10 +03:00
Dmitry Stogov 8d7d87cdc4 Add test 2021-12-03 13:40:17 +03:00
Dmitry Stogov 4a5c05a49d ws 2021-12-03 13:40:01 +03:00
Dmitry Stogov 1d054b3fa7 Fix array object clobbering by user error handler
Fixes oss-fuss #41605 and #41610
2021-12-03 13:35:28 +03:00
Dmitry Stogov 2515e788bc JIT: Fix register clobbering
Fixes oss-fuzz #41621
2021-12-03 11:13:50 +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 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 94286cd596 Fix yet another indirect string modification by error handler problem 2021-12-02 16:16:54 +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 df16da3697 Fixed ext/bz2/tests/005.phpt test failure introduesed by 09547c64c2 2021-12-02 10:32:45 +03:00
Sara Golemon 999c6f2c5d Bump for 8.0.15 2021-12-02 05:09:07 +00: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 09547c64c2 Fix clobering of operand by error handler in assignment to string offset
In some cases new code requires two reallocations insead of one.

Fixes oss-fuzz #31716, #36196, #39739 and #40002
2021-12-02 00:24:05 +03:00
Dmitry Stogov 9f6ab78610 Use proper functions 2021-12-01 22:43:19 +03:00
Derick Rethans 977e132842 Merge branch 'PHP-7.4' into PHP-8.0 2021-11-30 18:41:16 +00:00
Derick Rethans f533744c92 Prepare for 7.4.28 2021-11-30 18:40:42 +00: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 df434f056f Fix crash after indirect modification of string by user error handler
Fixes oss-fuzz #39346
2021-11-30 16:07:38 +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 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 86430e8e01 Fixed type inference (it's safe to ignore reference counting narrowing) 2021-11-29 23:32:52 +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 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 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 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 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
Jakub Zelenka 81513e6285 Add skip for FPM process idle flaky test 2021-11-27 22:37:43 +00:00
Nikita Popov 5f67b9fb43 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Disable enchant on azure i386
2021-11-26 11:04:29 +01:00
Nikita Popov c2d6d837ca Disable enchant on azure i386
The i386 libenchant library no longer installs without conflicts,
so drop i386 testing for this extension.
2021-11-26 11:03:32 +01: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 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
Dmitry Stogov f9518c3850 Fixed incorrect narrowing to double
Fixes oss-fuzz #41223
2021-11-25 15:14:04 +03:00
Dmitry Stogov 3c53a9fd73 Fixed incorrect refcountion inference for BW_NOT
BW_NOT for emtpy string returns empty string

Fixes oss-fuzz #41280
2021-11-25 13:51:56 +03:00
Dmitry Stogov f302430c72 Fixed incorrect DCE for ADD_ARRAY_ELEMENT instruction
DCE might remove INIT_ARRAY instruction but then keep the related
ADD_ARRAY_ELEMENT, becuse its both operands need to be freed.

Fixes oss-fuzz #41309
2021-11-25 13:33:26 +03:00
Remi Collet f6621037a0 add missing cond. 2021-11-25 10:14:30 +01:00
Remi Collet e713890d36 fix gdImagePngCtxEx call with system libgd 2021-11-25 08:27:07 +01:00
Christoph M. Becker 9237055141 "Export" relevant GD macros
For parity with non Windows systems, we should `AC_DEFINE` these macros
so that they are defined in config.w32.h instead of directly passed to
the compiler.  This allows extensions which have ext/gd as dependency
to check for these macros.  E.g. ext/ps does this[1], and fails to
build on Windows, because `HAVE_GD_BUNDLED` isn't defined.

[1] <https://github.com/steinm/ps/blob/RELEASE_1_4_4/ps.c#L34>

Closes GH-7680.
2021-11-24 18:23:28 +01:00
Nikita Popov be271f277e Fix bug #81652
We need to check not only for defs but also for uses of the
variable.
2021-11-24 15:18:31 +01:00
Christoph M. Becker b29e85a0da Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #75725: ./configure: detecting RAND_egd
2021-11-22 14:13:52 +01:00
Дилян Палаузов 60fe575ce3 Fix #75725: ./configure: detecting RAND_egd
Closes GH-7668.
2021-11-22 14:11:07 +01:00
Tyson Andre 241bd3f454 Fix use after free when WeakMap is modified during field write
(When a value's destructor triggers a resizing or rehashing of the WeakMap)

Closes GH-7671
2021-11-20 16:52:25 -05:00
Jakub Zelenka 2f8407f185 Increase read timeout in FPM process idle test 2021-11-20 20:42:19 +00:00