1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Commit Graph

6135 Commits

Author SHA1 Message Date
David CARLIER 952ffbfe50 macOs CI update. (#12998)
macOs CI update.

since sonoma (14) had been released since few months, we could afford to
upgrade to its previous release.
2023-12-22 15:24:53 +00:00
Cristian Rodríguez 927adfb1a6 Use a single version of mempcpy(3) (#12257)
While __php_mempcpy is only used by ext/standard/crypt_sha*, the
mempcpy "pattern" is used everywhere.

This commit removes __php_mempcpy, adds zend_mempcpy and transforms
open-coded parts into function calls.
2023-12-20 15:16:32 +00:00
Niels Dossche dd0f2abc80 Use param->len instead of strlen 2023-12-18 13:53:57 +00:00
Niels Dossche e6e0231a98 Use asprintf return value for the size 2023-12-18 13:53:57 +00:00
Niels Dossche b198d0cc0c Use precomputed length for phpdbg_try_file_init() 2023-12-18 13:53:57 +00:00
Niels Dossche 61b7370b6d Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12929: SimpleXMLElement with stream_wrapper_register can segfault
  Fix getting the address of an uninitialized property of a SimpleXMLElement resulting in a crash
  Fix GH-12962: Double free of init_file in phpdbg_prompt.c
2023-12-17 11:52:48 +01:00
Niels Dossche 4fc336c784 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix getting the address of an uninitialized property of a SimpleXMLElement resulting in a crash
  Fix GH-12962: Double free of init_file in phpdbg_prompt.c
2023-12-17 11:50:42 +01:00
Niels Dossche a6d17bffe1 Fix GH-12962: Double free of init_file in phpdbg_prompt.c
See GH-12962 for analysis.

Closes GH-12963.
2023-12-17 11:46:02 +01:00
Jakub Zelenka 2ffd040ffd Merge branch 'PHP-8.3' 2023-12-09 13:26:29 +00:00
Jakub Zelenka 43900bd568 Merge branch 'PHP-8.2' into PHP-8.3 2023-12-09 13:26:09 +00:00
Jakub Zelenka 62682cbd97 Add FPM tester logs printing for all errors
Closes GH-12902
2023-12-09 13:21:41 +00:00
Ilija Tovilo 5f3b4c5d6c Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix max_execution_time with cli-server router script
2023-12-07 16:13:27 +01:00
Ilija Tovilo a559a5e530 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix max_execution_time with cli-server router script
2023-12-07 16:13:21 +01:00
Ilija Tovilo 299c3ba89e Fix max_execution_time with cli-server router script
When the cli-server specifies a router script, we run it using
zend_execute_scripts instead of php_execute_script, because the former preserves
the return value of the script. However, php_execute_script also starts resets
the execution timer with the value from max_execution_time. If the timer has
previously been initialized with max_input_time, it will never be reset, and
thus trigger at the incorrect time.

Closes GH-12886
2023-12-07 16:11:48 +01:00
Remi Collet 6f569b42fa Merge branch 'PHP-8.3'
* PHP-8.3:
  fix function declaration isn't a prototype [-Wstrict-prototypes]
2023-12-06 14:52:04 +01:00
Remi Collet 6d50e58197 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  fix function declaration isn't a prototype [-Wstrict-prototypes]
2023-12-06 14:51:44 +01:00
Remi Collet 0d1bf582ce fix function declaration isn't a prototype [-Wstrict-prototypes] 2023-12-06 14:51:27 +01:00
Niels Dossche 6edbbc1c3e Implement GH-12385: flush headers without body when calling flush()
Closes GH-12785.
2023-12-01 17:15:57 +01:00
Jakub Zelenka 2d8f7df3b4 Merge branch 'PHP-8.3' 2023-12-01 14:49:22 +00:00
Jakub Zelenka c74fc4c5b0 Merge branch 'PHP-8.2' into PHP-8.3 2023-12-01 14:47:57 +00:00
Jakub Zelenka 2303e76740 Merge branch 'PHP-8.1' into PHP-8.2 2023-12-01 14:45:48 +00:00
Patrick Prasse df259f88da Fix bug GH-12705: Segmentation fault in fpm_status_export_to_zval
Closes GH-12706
2023-12-01 14:43:58 +00:00
Peter Kokot dc1fbe4027 Remove duplicated socket check (#12839)
Check is already done in configure.ac.
2023-12-01 11:57:38 +00:00
Peter Kokot 359f78492e Remove outdated link to PHP introduction in PHP FPM (#12842) 2023-12-01 10:26:18 +00:00
Alex Dowad 175b438abe Fix spurious failures of php-fuzz-mbstring 2023-11-28 21:04:17 +02:00
Niels Dossche df2af7ff65 Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
Have to use file_put_contents() instead of --FILE-- because we have to
actually load it using the exec command, *and* have to make multiple
files, and note that we can only load files relative from the current
directory, so we can't rely on files being in the sapi/phpdbg/tests
folder.

Closes GH-12680.
2023-11-22 20:39:29 -06:00
Niels Dossche e1c6a7c4de Fix GH-12621: browscap segmentation fault when configured in the vhost
The temporary HashTable has a destructor that releases the string held
by the entry's value. However, browscap_intern_str(_ci) only incremented
the refcount for the reference created by the return value. As the
HashTable is only used during parsing, we don't need to manage the
reference count of the value anyway, so get rid of the destructor.

This is triggerable in two cases:
 - When using php_admin_value to set the ini at the activation stage
 - When running out of space for the opcache-interned strings

Closes GH-12634.
2023-11-22 20:39:28 -06:00
Levi Morrison 7843ef7ad5 Merge branch 'PHP-8.3' 2023-11-21 18:33:14 -07:00
Levi Morrison c524dc6565 test: allow other zend extensions to not fail the test 2023-11-21 18:32:50 -07:00
Peter Kokot 5c523edffe Remove obsolete IRIX checks (#12737)
IRIX is a discontinued and closed-source OS with last release in 2006.
2023-11-21 02:56:53 +00:00
Dmitry Stogov b46ed399c6 Fix php.ini (add missing "\n") 2023-11-20 11:59:47 +03:00
Niels Dossche d882c5d580 Merge branch 'PHP-8.3'
* PHP-8.3:
  Use __DIR__-relative path in tests
  Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
2023-11-15 22:01:05 +01:00
Niels Dossche c83632a503 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use __DIR__-relative path in tests
  Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
2023-11-15 22:00:44 +01:00
Niels Dossche 4f1103ef3b Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
Have to use file_put_contents() instead of --FILE-- because we have to
actually load it using the exec command, *and* have to make multiple
files, and note that we can only load files relative from the current
directory, so we can't rely on files being in the sapi/phpdbg/tests
folder.

Closes GH-12680.
2023-11-15 21:59:55 +01:00
Daniil Gentili df286a1b98 Improve JIT config in fuzzer SAPI (#12519)
* Improve JIT config in fuzzer SAPI

* Fix

* Fix

* Update
2023-11-14 21:26:24 +03:00
David CARLIER cc2bf11951 zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650)
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and helping array bound checking.
2023-11-13 12:42:45 +00:00
Niels Dossche 299a234eb7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12621: browscap segmentation fault when configured in the vhost
2023-11-11 18:36:41 +01:00
Niels Dossche 1fb73463d3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12621: browscap segmentation fault when configured in the vhost
2023-11-11 18:36:32 +01:00
Niels Dossche 7353c7ce17 Fix GH-12621: browscap segmentation fault when configured in the vhost
The temporary HashTable has a destructor that releases the string held
by the entry's value. However, browscap_intern_str(_ci) only incremented
the refcount for the reference created by the return value. As the
HashTable is only used during parsing, we don't need to manage the
reference count of the value anyway, so get rid of the destructor.

This is triggerable in two cases:
 - When using php_admin_value to set the ini at the activation stage
 - When running out of space for the opcache-interned strings

Closes GH-12634.
2023-11-11 18:35:57 +01:00
Jakub Zelenka 311cae03e7 Merge branch 'PHP-8.3' 2023-11-10 09:46:25 +00:00
Jakub Zelenka d02a8f4e87 Separate setting of SO_KEEPALIVE in FPM tests
Closes GH-12640
2023-11-10 09:45:19 +00:00
Peter Kokot d0056d63da [skip ci] Use GitHub issue tracker link for reporting bugs (#12612) 2023-11-06 12:45:12 +00:00
Jakub Zelenka f288d9c4b0 Merge branch 'PHP-8.3' 2023-11-03 17:18:40 +00:00
Jakub Zelenka 52b13f6ddb Merge branch 'PHP-8.2' into PHP-8.3 2023-11-03 17:17:52 +00:00
Jakub Zelenka 882cc4f804 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-03 17:17:23 +00:00
Jakub Zelenka a8c6c6165b Fix GH-9921: Loading ext in FPM config does not register module handlers
Closes GH-12377
2023-11-03 16:53:09 +00:00
Jakub Zelenka a66c926b68 Merge branch 'PHP-8.3' 2023-11-03 14:08:39 +00:00
Jakub Zelenka e43438544e Merge branch 'PHP-8.2' into PHP-8.3 2023-11-03 14:07:36 +00:00
Jakub Zelenka e3d1beb0f1 Fix bug #76922: FastCGI terminates conn after FCGI_GET_VALUES
Closes GH-12387
2023-11-03 14:06:36 +00:00
Michael Voříšek cc8c24ab8f Fix unused variable in phpdbg_cmd.c (#12575) 2023-10-31 08:28:16 +01:00