1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

126072 Commits

Author SHA1 Message Date
Nikita Popov 1ea58832e2 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix bug #81472: Support large device major/minor number
2021-09-24 09:58:29 +02:00
Nikita Popov 2b0288b220 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug #81472: Support large device major/minor number
2021-09-24 09:58:22 +02:00
Lin Yang 9ad8fadcbb Fix bug #81472: Support large device major/minor number
Latest linux kernel use large number (12 bits for major device, 20
bits for minor device). Current code only supports previous standard
(5 chars), which means 8 bits for major and 8 bits for minor device.
It will fail if device number is out of that range. So this patch
increases device number read from /proc/self/maps file.

Closes GH-7512.
2021-09-24 09:57:32 +02:00
Nikita Popov 9bf21a446a Merge branch 'PHP-8.1'
* PHP-8.1:
  Avoid shell for proc_terminate() test
2021-09-24 09:47:06 +02:00
Nikita Popov 2323dc2ac7 Avoid shell for proc_terminate() test
Otherwise we're sending the signal to the shell, not the sleep
process, and it will continue sleeping.

This also illustrates a minor issue without our array proc_open()
support: We don't preserve the passed arguments in the
proc_get_status() output.
2021-09-24 09:45:49 +02:00
Nikita Popov 498674058c Remove zend_binary_zval_strcasecmp() APIs
These are thin wrappers ... around the wrong functions. They call
the "_l()" version of the underlying APIs. For clarify, just call
the wrapped API directly.
2021-09-24 09:38:08 +02:00
Nikita Popov 605ac4649c Merge branch 'PHP-8.1'
* PHP-8.1:
  Use ASCII lower case for misc case folding
2021-09-24 09:23:18 +02:00
Tim Starling c96be7b8f2 Use ASCII lower case for misc case folding
Use ASCII case conversion instead of locale-dependent case conversion in
the following places:

* grapheme_stripos() and grapheme_strripos() in the "fast" path
* ldap_get_entries()
* oci_pconnect() for case folding of parameters when constructing a key
  into the connection or session pool
* SoapClient: case folding of function names
* get_meta_tags(): case conversion of property names
* http stream wrapper: header names
* phpinfo(): anchor names
* php_verror(): docref URLs
* rfc1867.c: Content-Type boundary parameter name
* streams.c: stream protocol names

Using locale-dependent case folding for these cases is either
unnecessary or actively incorrect. These functions could have
misbehaved when used with certain locales (e.g. Turkish).

Closes GH-7511.
2021-09-24 09:20:08 +02:00
Dmitry Stogov fd5b3ab3ea Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed typo
2021-09-24 09:21:14 +03:00
Dmitry Stogov 92d0abd075 Fixed typo 2021-09-24 09:20:57 +03:00
Christoph M. Becker 3cd5f2685b Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix gdAlphaMax limit typo
2021-09-23 23:20:26 +02:00
Christoph M. Becker 67131e453b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix gdAlphaMax limit typo
2021-09-23 23:20:00 +02:00
Christoph M. Becker c0dcd141a8 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix gdAlphaMax limit typo
2021-09-23 23:18:52 +02:00
Michael Voříšek 2c3dfe5160 Fix gdAlphaMax limit typo
Closes GH-7410.
2021-09-23 23:16:40 +02:00
Dmitry Stogov f024119718 Merge branch 'PHP-8.1'
* PHP-8.1:
  Tracing JIT: Fixed possible incorrect megamorphic call from a trait
2021-09-23 23:41:35 +03:00
Dmitry Stogov c7c7620918 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed possible incorrect megamorphic call from a trait
2021-09-23 23:41:11 +03:00
Dmitry Stogov 3e6919cfb3 Tracing JIT: Fixed possible incorrect megamorphic call from a trait 2021-09-23 23:38:03 +03:00
Nikita Popov c37b35fa41 Merge branch 'PHP-8.1'
* PHP-8.1:
  Use locale-independent case conversion in mb_send_mail()
2021-09-23 17:21:14 +02:00
Nikita Popov 46315defc7 Use locale-independent case conversion in mb_send_mail()
Headers should not be processed in a locale-depdendent fashion.
Switch from upper to lowercasing because that's the standard for
PHP and we provide an ASCII implementation of this operation.

This is adapted from GH-7506.
2021-09-23 17:20:54 +02:00
Nikita Popov b732b6d06f Try to fetch opcache.so path relative to binary
While the cwd-relative lookup worked for the oss-fuzz docker images,
it doesn't seem to work on the cluster infrastructure. Try finding
opcache.so relative to the binary instead.
2021-09-23 16:44:03 +02:00
Mahmood Dhia ac34648cf6 Fix DATE_FORMAT_COOKIE definition
In all of http://curl.haxx.se/rfc/cookie_spec.html,
https://docs.microsoft.com/de-de/windows/win32/wininet/http-cookies
and https://tools.ietf.org/html/rfc7234#section-5.3 the cookie
datetime is specified as Mon, DD-Mon-YYYY HH:MM:SS GMT. However,
the current definition returns Monday, DD-Mon-YYY HH:MM:SS GMT.
Therefore, the "l" in "l, d-M-Y H:i:s T" must be changed to "D".

Closes GH-6783.
2021-09-23 16:01:04 +02:00
Nikita Popov 1c178569b4 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed bug #81465
2021-09-23 14:31:40 +02:00
Nikita Popov a942b284e6 Fixed bug #81465
Make the error message for enum cases more technically correct.
2021-09-23 14:29:27 +02:00
Dmitry Stogov eb7734c91d Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed register clobbering
2021-09-23 15:04:42 +03:00
Dmitry Stogov a0bea10e5b JIT: Fixed register clobbering 2021-09-23 15:04:05 +03:00
Nikita Popov 40aa6b63d1 Further limit max input size in parser fuzzer
It's easy to cause stack overflows with degenerate cases like
"$$$$$x" repeated thousands of times. We have no interest in
addressing these.

Make the input size smaller to hopefully avoid these stack
overflows.
2021-09-23 13:11:21 +02:00
Nikita Popov 982b1498c4 Merge branch 'PHP-8.1'
* PHP-8.1:
  Bail on exception during delayed autoload
2021-09-23 12:47:08 +02:00
Nikita Popov 3991483727 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Bail on exception during delayed autoload
2021-09-23 12:46:56 +02:00
Nikita Popov be8217368b Bail on exception during delayed autoload
We shouldn't try to load further classes if one autoload throws.

This fixes oss-fuzz #38881, though I believe there are still two
deeper issues here: 1) Why do we allow autoloading with an active
exception? 2) Exception save & restore should probably also save
and restore the exception opline.
2021-09-23 12:46:39 +02:00
Dmitry Stogov adc03652dd Merge branch 'PHP-8.1'
* PHP-8.1:
  Tracing JIT: Remove incorrect assertion
2021-09-23 12:15:16 +03:00
Dmitry Stogov 5eb3e30867 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Remove incorrect assertion
2021-09-23 12:15:05 +03:00
Dmitry Stogov 430454268f Tracing JIT: Remove incorrect assertion 2021-09-23 12:14:33 +03:00
Nikita Popov 2157d11ddc Merge branch 'PHP-8.1'
* PHP-8.1:
  Don't treat expression exit as terminator
2021-09-23 10:26:34 +02:00
Nikita Popov c9762be566 Don't treat expression exit as terminator
Same as with throw expressions, this may remove later temporary
consuming instructions and thus eliminate live ranges, resulting
in a memory leak. We make use of the same hack and don't consider
exit a terminator if used in an expression context.
2021-09-23 10:26:07 +02:00
Dmitry Stogov f6282a60fc Merge branch 'PHP-8.1'
* PHP-8.1:
  Tracing JIT: Fixed possible stack-buffer-overflow.
2021-09-23 10:52:26 +03:00
Dmitry Stogov 757c1277eb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fixed possible stack-buffer-overflow.
2021-09-23 10:52:17 +03:00
Dmitry Stogov 08100e81e5 Tracing JIT: Fixed possible stack-buffer-overflow. 2021-09-23 10:51:20 +03:00
Dmitry Stogov 760cfaade1 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed use-after-free introduced in f2ceb639b8
2021-09-23 10:38:12 +03:00
Dmitry Stogov 0f084387f8 Fixed use-after-free introduced in f2ceb639b8 2021-09-23 10:37:25 +03:00
Dmitry Stogov ac2d85da4d Merge branch 'PHP-8.1'
* PHP-8.1:
  Remove weird condition
2021-09-23 01:13:39 +03:00
Dmitry Stogov 4317da35d3 Remove weird condition 2021-09-23 01:12:49 +03:00
Dmitry Stogov 2da8e00d4f Merge branch 'PHP-8.1'
* PHP-8.1:
  Check for zend_shared_alloc() failures
2021-09-23 01:02:28 +03:00
Dmitry Stogov 114a0ffd19 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Check for zend_shared_alloc() failures
2021-09-23 01:01:26 +03:00
Dmitry Stogov 17a99f2b11 Check for zend_shared_alloc() failures 2021-09-23 01:00:50 +03:00
Máté Kocsis 0b524a56f5 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix a few more classsynopsis generation issues
2021-09-22 23:10:37 +02:00
Máté Kocsis 8168d312f9 Fix a few more classsynopsis generation issues
Closes GH-7480
2021-09-22 23:09:43 +02:00
Dmitry Stogov 7764d05c87 Merge branch 'PHP-8.1'
* PHP-8.1:
  JIT: Fixed possible memory leak
2021-09-22 22:59:43 +03:00
Dmitry Stogov b9f12d628f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fixed possible memory leak
2021-09-22 22:58:57 +03:00
Dmitry Stogov 09d4037a17 JIT: Fixed possible memory leak 2021-09-22 22:57:57 +03:00
Kamil Tekiela 5c13587aad Remove php_mysqli_persistent_helper_once (#7507) 2021-09-22 18:58:51 +01:00