Commit Graph

5895 Commits

Author SHA1 Message Date
Elan Ruusamäe
e114f32596
Avoid code duplication in php_ini.c (#4512) 2022-12-10 12:51:13 +01:00
Jorg Adam Sowa
77ee92a50c
Remove unnecessary usage of CONST_CS
Closes GH-9685.
2022-11-28 17:12:07 +01:00
Ilija Tovilo
51a99456e2
Merge branch 'PHP-8.2'
* PHP-8.2:
  Remove unnecessary ast eval bailout
2022-10-27 10:56:04 +02:00
Ilija Tovilo
1d6b32f65c
Remove unnecessary ast eval bailout
We can just reset the filename_override to NULL in php_request_shutdown.

Closes GH-9805
2022-10-27 10:54:59 +02:00
Jakub Zelenka
b8d013a48d
Merge branch 'PHP-8.2' 2022-10-23 12:41:51 +01:00
Jakub Zelenka
b732d80329
Fix bug GH-9779: stream_copy_to_stream fail when dest in append mode 2022-10-23 12:40:22 +01:00
Arnaud Le Blanc
77eadc5c9f Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  [ci skip] NEWS
  Fix compilation warning
  Fix crash when memory limit is exceeded during generator initialization
2022-10-22 10:45:21 +02:00
Arnaud Le Blanc
cfd5fb98e4 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  [ci skip] NEWS
  Fix compilation warning
  Fix crash when memory limit is exceeded during generator initialization
2022-10-22 10:44:55 +02:00
Arnaud Le Blanc
ebe58459aa Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  [ci skip] NEWS
  Fix compilation warning
  Fix crash when memory limit is exceeded during generator initialization
2022-10-22 10:44:06 +02:00
Benoit
994097093c Fix compilation warning 2022-10-22 10:41:02 +02:00
George Peter Banyard
a1953d5b29
Drop usage of confusing zend_fcall_info_call() API
The last parameter which is named zval *args, does NOT set the FCI params field. It is expected to be a PHP array which gets looped over to set the arguments which is also a zval pointer...

Since PHP 8.0, the named_params field is a more appropriate way of doing this.
2022-10-21 18:31:40 +01:00
Jakub Zelenka
18fe337bae
Fix bug #51056: fread() on blocking stream will block even if data is available
This is applied only on socket connection which already returns
immediately if there is no data in the buffer.
2022-10-16 12:17:47 +01:00
Máté Kocsis
66f3b5ffb2
Declare main constants in stubs - part 3 (#9731) 2022-10-12 14:42:22 +02:00
Ben Ramsey
865161af33
PHP-8.1 is now for PHP 8.1.13-dev 2022-10-11 19:47:00 -04:00
Máté Kocsis
d90ecb9582
Declare main constants in stubs - part 2 (#9714) 2022-10-11 13:48:52 +02:00
Arnaud Le Blanc
5b6f9df51a Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  [ci skip] NEWS
  Return immediately when FD_SETSIZE is exceeded (#9602)
2022-10-01 11:26:17 +02:00
Arnaud Le Blanc
246d13cd99 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  [ci skip] NEWS
  Return immediately when FD_SETSIZE is exceeded (#9602)
2022-10-01 11:24:23 +02:00
Arnaud Le Blanc
d4b99542d5 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  [ci skip] NEWS
  Return immediately when FD_SETSIZE is exceeded (#9602)
2022-10-01 11:23:34 +02:00
Arnaud Le Blanc
80232de0e4
Return immediately when FD_SETSIZE is exceeded (#9602) 2022-10-01 11:20:43 +02:00
Máté Kocsis
93982b144d
Declare main constants in stubs - part 1 (#9616) 2022-09-30 13:49:59 +02:00
Jakub Zelenka
d2288ec5ed
Clarify memory usage and slightly improve sapi_read_post_data
This is a result of checking GH-8800 which assumed potential
memory leaks here. Even though it was not the case in reality,
the function deserves a bit of clarification to prevent similar
attempts in the future.
2022-09-30 11:54:41 +01:00
Ilija Tovilo
138fd5b3c8
Replace reallocarray with safe_perealloc
Fixes GH-9581
2022-09-29 15:15:40 +02:00
Derick Rethans
01677cafae Merge branch 'PHP-8.2' 2022-09-27 14:11:47 +01:00
Derick Rethans
25290cd25c Merge branch 'PHP-8.1' into PHP-8.2 2022-09-27 14:11:40 +01:00
Derick Rethans
cfee252a95 Merge branch 'PHP-8.0' into PHP-8.1 2022-09-27 14:11:31 +01:00
Derick Rethans
def8c8d174 Merge branch 'PHP-7.4' into PHP-8.0 2022-09-27 14:11:14 +01:00
Ilija Tovilo
b61c81c949
Replace reallocarray with safe_perealloc (#9593) 2022-09-22 14:55:41 +02:00
Sara Golemon
559da529a0
Bump for 8.0.25 2022-09-13 23:46:26 +00:00
Patrick Allaert
0f575aa698
PHP-8.1 is now for PHP 8.1.12-dev 2022-09-13 23:09:47 +02:00
Dmitry Stogov
72fec0bbf3 Merge branch 'PHP-8.2'
* PHP-8.2:
  Reset FG(user_stream_current_filename) at the end of request
2022-09-12 11:39:36 +03:00
Dmitry Stogov
d64aa6f646 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Reset FG(user_stream_current_filename) at the end of request
2022-09-12 11:39:27 +03:00
Dmitry Stogov
f4afa9adc6 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Reset FG(user_stream_current_filename) at the end of request
2022-09-12 11:39:18 +03:00
Dmitry Stogov
d0b3096ff0 Reset FG(user_stream_current_filename) at the end of request
Attempt to fix oss-fuzz #51047
2022-09-12 11:38:31 +03:00
Derick Rethans
0611be4e82 Fix #81727: Don't mangle HTTP variable names that clash with ones that have a specific semantic meaning. 2022-09-09 17:10:04 +01:00
Pierrick Charron
58a92772ab
Prepare PHP 8.2.0 RC1 2022-08-30 11:57:05 -04:00
Pierrick Charron
327c95237c
Prepare for PHP 8.3 2022-08-30 11:17:15 -04:00
Sara Golemon
3d6ed8c852
Catch up dev version numbers 2022-08-30 12:15:27 +00:00
Jakub Zelenka
f3c357c446
Merge branch 'PHP-8.1' 2022-08-29 22:34:48 +01:00
Jakub Zelenka
bf97b3649d
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-29 22:33:02 +01:00
Jakub Zelenka
3503b1daa2
Fix bug #77780: "Headers already sent" when previous connection was aborted
This change primarily splits SAPI deactivation to module and destroy
parts. The reason is that currently some SAPIs might bail out
on deactivation. One of those SAPI is PHP-FPM that can bail out on
request end if for example the connection is closed by the client
(web sever). The problem is that in such case the resources are not
freed and some values reset. The most visible impact can have not
resetting the PG(headers_sent) which can cause erorrs in the next
request. One such issue is described in #77780 bug which this fixes
and is also cover by a test in this commit. It seems reasonable
to separate deactivation and destroying of the resource which means
that the bail out will not impact it.
2022-08-29 22:25:53 +01:00
Ben Ramsey
7f26661993
PHP-8.1 is now for PHP 8.1.11-dev 2022-08-16 10:45:29 -05:00
twosee
ef39adb638
Merge branch 'PHP-8.1'
* PHP-8.1:
  Re-fix GH-8409: SSL handshake timeout persistent connections hanging
  Revert "Fix GH-8409: SSL handshake timeout persistent connections hanging"
2022-08-14 20:15:35 +08:00
twosee
14d71957ca
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Re-fix GH-8409: SSL handshake timeout persistent connections hanging
2022-08-14 20:14:57 +08:00
twosee
b8d07451d4
Re-fix GH-8409: SSL handshake timeout persistent connections hanging
This fix is another solution to replace d0527427be, use zend_try and zend_catch to make sure persistent stream will be released when error occurred.

Closes GH-9332.
2022-08-14 20:13:36 +08:00
Jakub Zelenka
897ca85d33
Revert "Fix GH-8409: SSL handshake timeout persistent connections hanging"
This reverts commit d0527427be.

This patch makes Swoole/Swow can not work anymore, because Coroutine will yield to another one during socket operation, EG(record_errors) assertion will always fail, and zend_begin_record_errors() was only used during compile time before.
Note: zend_emit_recorded_errors() and the typo fix are reserved.
2022-08-14 19:41:06 +08:00
Jakub Zelenka
438f692e92
Merge branch 'PHP-8.1' 2022-08-12 17:12:28 +01:00
Jakub Zelenka
d0527427be
Fix GH-8409: SSL handshake timeout persistent connections hanging
This is not actually related to SSL handshake but stream socket creation
which does not clean errors if the error handler is set. This fix
prevents emitting errors until the stream is freed.
2022-08-12 17:09:24 +01:00
David CARLIER
393577ced9
reallocarray using proper inline facility to check overflow on windows. (#9300) 2022-08-12 12:08:03 +01:00
Jakub Zelenka
80197c59ec
Merge branch 'PHP-8.1' 2022-08-07 14:22:33 +01:00
Jakub Zelenka
c9fa98a174
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-07 14:21:39 +01:00