Commit Graph

131525 Commits

Author SHA1 Message Date
Ilija Tovilo
486fb80947
[skip ci] Remove accidental run-tests.php line 2023-03-06 15:05:11 +01:00
Ilija Tovilo
9944f58d3f
Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-10709: UAF in recursive AST evaluation
2023-03-06 15:03:19 +01:00
Ilija Tovilo
1978a7b393
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10709: UAF in recursive AST evaluation
2023-03-06 14:58:25 +01:00
Ilija Tovilo
7202fe16b7
Fix GH-10709: UAF in recursive AST evaluation
Fixes https://oss-fuzz.com/testcase-detail/6445949468934144
Closes GH-10718
2023-03-06 14:55:34 +01:00
Ilija Tovilo
87e3513274
Re-add missing EXPECTHEADERS sections
--bless removes them when there are changes in the expect section...
2023-03-06 14:46:58 +01:00
Ilija Tovilo
2110398dee
Fix missing return FAILURE 2023-03-06 14:44:36 +01:00
Ilija Tovilo
82dfd93b9d
Throw on negative setcookie expiration timestamp
Fixes GH-10765
2023-03-06 14:01:17 +01:00
Niels Dossche
aef5250eae Merge branch 'PHP-8.2'
* PHP-8.2:
  Add missing error check on PEM_write_bio_PKCS7()
  Add missing error check on PEM_write_bio_CMS()
  Add missing error check on i2d_PKCS12_bio()
  Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit()
2023-03-05 22:16:23 +01:00
Niels Dossche
a13cca8a81 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add missing error check on PEM_write_bio_PKCS7()
  Add missing error check on PEM_write_bio_CMS()
  Add missing error check on i2d_PKCS12_bio()
  Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit()
2023-03-05 22:12:36 +01:00
Niels Dossche
22c9e7e27e Add missing error check on PEM_write_bio_PKCS7()
Closes GH-10752.
2023-03-05 22:07:43 +01:00
nielsdos
51ea4a680d Add missing error check on PEM_write_bio_CMS()
On failure, this function returns 0. 2 other callers of this function
already check the return value, but this one was missed.
2023-03-05 22:06:23 +01:00
nielsdos
d2ef1561fb Add missing error check on i2d_PKCS12_bio()
This function returns 0 on error and 1 on success. The error case was
not checked and the function therefore would've returned true.
The only other caller of i2d_PKCS12_bio() in the file has
a correct error check.

Closes GH-10761.
2023-03-05 22:05:53 +01:00
Niels Dossche
30ebecb1d4 Add missing error checks on EVP_MD_CTX_create() and EVP_VerifyInit()
The first one returns NULL on error, and the second one returns 0 on
error. These weren't checked.

Closes GH-10762.
2023-03-05 22:05:11 +01:00
Ilija Tovilo
6a7115359e
Fix gcc warnings in zend_API.c with --disable-debug (#10786)
-Warray-bounds complains about malloc(sizeof(zend_arg_info) * num_args) being
smaller than zend_function when dereferencing reg_function.
2023-03-05 21:38:05 +01:00
Ilija Tovilo
95fbd2039f
Fix -Wmaybe-uninitialized warning in JIT 2023-03-05 21:35:22 +01:00
Ilija Tovilo
ad7b90b674
Ignore -Warray-bounds compiler warning in JIT (#10789)
The out-of-bounds pointer is intentional.
2023-03-05 21:30:03 +01:00
Ilija Tovilo
9f1269a34e
[skip ci] fix typo in comment 2023-03-05 21:28:50 +01:00
Ilija Tovilo
5904952af9
Fix metaphone encode compiler warning
warning: array subscript -65 is below array bounds of ‘const char[26]‘
[-Warray-bounds]

Errors like these sometimes only appear with optimizations when inlining/loop
unrolling.

Closes GH-10788
2023-03-05 21:27:25 +01:00
Ilija Tovilo
9fadf6d96b
Merge branch 'PHP-8.2'
* PHP-8.2:
  Update windows action to checkout@v3
2023-03-05 17:50:50 +01:00
Ilija Tovilo
256d23ca26
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Update windows action to checkout@v3
2023-03-05 17:50:40 +01:00
Ilija Tovilo
28ef654648
Update windows action to checkout@v3 2023-03-05 17:50:22 +01:00
Niels Dossche
43c71dfe52 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime)
2023-03-05 00:05:42 +01:00
Niels Dossche
d8294f2824 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime)
2023-03-04 23:57:03 +01:00
Niels Dossche
e633be3e87 Fix GH-10766: PharData archive created with Phar::Zip format does not keep files metadata (datetime)
Due to an incorrect check, the datetime was never actually set.
To test this we need to write the file using phar, but read the file
using a different method to not get a cached, or a value that's been
transformed twice and is therefore accidentally correct.

Closes GH-10769
2023-03-04 23:43:48 +01:00
Alex Dowad
86ec0bc55c Fix failure of AVX2-accelerated mb_check_encoding on 32-bit MS Windows
Thanks to Ilija Tovilo for noticing and reporting this problem. Thanks
also to Michael Voříšek for finding the StackOverflow post which
explained the reason for the failure.
2023-03-04 20:42:41 +02:00
Tim Düsterhus
8abea1b3c2
random: Convert php_random_(bytes|int)_(silent|throw) into inline functions (#10763)
Compared to macros, inline functions are more robust and easier to debug.

Also, use true/false at the same time instead of 1 and 0.
2023-03-04 03:33:22 +00:00
David CARLIER
3310463484 Revert "Zend/zend_type_code: remove hard-coded integer values and"
This reverts commit c7637ed1c0.
2023-03-03 21:19:58 +00:00
David Carlier
244b883c07 Merge branch 'PHP-8.2' 2023-03-03 21:12:27 +00:00
David Carlier
eb9d556fd4 Merge branch 'PHP-8.1' into PHP-8.2 2023-03-03 21:12:04 +00:00
David Carlier
574a7e7ef8 ext/ftp fix ftp_nb_get signature (for failure).
ref: https://github.com/php/doc-en/pull/2331#issuecomment-1448984096

Closes GH-10760.
2023-03-03 21:08:16 +00:00
Máté Kocsis
e053ba0a3a
Do not allow side-effects when readonly property modification fails (#10757) 2023-03-03 19:53:42 +01:00
Derick Rethans
792400bc68 Merge branch 'PHP-8.2' 2023-03-03 16:52:51 +00:00
Derick Rethans
bbcc1dadea Merge branch 'PHP-8.1' into PHP-8.2 2023-03-03 16:52:26 +00:00
Derick Rethans
7fcea9d260 Add missing ZEND_ARG_VARIADIC_OBJ_TYPE_MASK macro, and use consistent class_name variable name 2023-03-03 16:51:51 +00:00
Ilija Tovilo
cfba9cd4bd
Merge branch 'PHP-8.2'
* PHP-8.2:
  Propagate success status of ftp_close() to userland
2023-03-03 15:26:51 +01:00
Ilija Tovilo
4c2ee6fa21
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Propagate success status of ftp_close() to userland
2023-03-03 15:26:45 +01:00
nielsdos
abc6fe8f2e
Propagate success status of ftp_close() to userland
The docs say that this function returns true on success, and false on
error. This function always returns true in the current implementation
because the success return value from ftp_close() is never propagated to
userland. This affects one test: since the test server exits after an
invalid login, the ftp close correctly fails (because the server has
gone away).
2023-03-03 15:26:11 +01:00
David Carlier
02e8c16dfd Merge branch 'PHP-8.2' 2023-03-03 12:45:10 +00:00
David Carlier
8b70393c23 Merge branch 'PHP-8.1' into PHP-8.2 2023-03-03 12:44:33 +00:00
David Carlier
ffc2a53a9b Fix GH-10728: opcache capstone header's inclusion.
Remove capstone include folder.
For most of the supported systems it worked fine somehow despite
 the pkg-config --cflags, but is always include it even on Linux.

Closes GH-10732.
2023-03-03 12:43:12 +00:00
Máté Kocsis
dab783f7ae
Fix operator precedence in the skip section of readonly tests 2023-03-03 13:01:36 +01:00
Arnaud Le Blanc
0c7fc351ea Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:56:34 +01:00
Arnaud Le Blanc
ae845cc6c9 [ci skip] NEWS 2023-03-03 11:46:16 +01:00
Arnaud Le Blanc
37030257b8 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  fix: support for timeouts with ZTS on Linux (#10141)
2023-03-03 11:45:50 +01:00
Arnaud Le Blanc
8f92a07852 [ci skip] NEWS 2023-03-03 11:44:33 +01:00
Kévin Dunglas
ad85e71421
fix: support for timeouts with ZTS on Linux (#10141) 2023-03-03 11:35:06 +01:00
Ilija Tovilo
ccc16b45ef
[skip ci] Skip failing readonly+clone tests for JIT for now
See implementation at GH-10748
2023-03-03 10:43:20 +01:00
Danack
3e6d49e042
Fix warning in run-tests when PHP compiled without generating phpdbg support. (#10745) 2023-03-03 01:50:02 +00:00
Alex Dowad
e447036dc6 Merge branch 'PHP-8.2'
* PHP-8.2:
  Propagate error checks for mbfl_filt_conv_illegal_output()
  Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb()
  Make error checks on encoding methods for docomo, kddi, sb consistent
2023-03-02 23:12:09 +02:00
Alex Dowad
3142829562 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Propagate error checks for mbfl_filt_conv_illegal_output()
  Use CK() macro to check the output function in mbfilter_unicode2sjis_emoji_sb()
  Make error checks on encoding methods for docomo, kddi, sb consistent
2023-03-02 22:50:37 +02:00