Commit graph

136644 commits

Author SHA1 Message Date
Niels Dossche
c3a5b98771
Add zend_hash_get_current_pos_ex() (#14770) 2024-07-02 19:11:41 +02:00
Eric Mann
b229f189ee
Update NEWS for PHP 8.4.0alpha1 2024-07-02 08:01:30 -07:00
Arnaud Le Blanc
c08fe2dfc4
[ci skip] NEWS/UPGRADING for GH-13460 2024-07-02 15:24:11 +02:00
Arnaud Le Blanc
3c56af9902
Allow fiber switching during destructor execution
Fiber switching was disabled during destructor execution due to conflicts
with the garbage collector. This unfortunately introduces a function color
problem: destructors can not call functions that may switch Fibers.

In this change we update the GC so that Fiber switching during GC is safe. In
turn we allow Fiber switching during destrutor execution.

The GC executes destructors in a dedicated Fiber. If a destructor suspends, the
Fiber is owned by userland and a new dedicated Fiber is created to execute the
remaining destructors. Destructor suspension results in a resurection of the
object, which is handled as usual: The object is not considered garbage anymore,
but may be collected in a later run.

When the GC is executed in the main context (not in a Fiber), then destructors
are executed in the main context as well because there is no risk of conflicting
with GC in this case (main context can not suspend).

Fixes GH-11389
Closes GH-13460
2024-07-02 15:00:40 +02:00
Arnaud Le Blanc
7c6ff87869
Expose fibers API 2024-07-02 15:00:40 +02:00
David CARLIER
6b037200a4
sapi/cli: setting process name little optimisation. (#14767) 2024-07-02 12:12:34 +01:00
Peter Kokot
7575905db8
Autotools: Refactor PEAR check (#14765)
- Synced CS: AS_VAR_IF style checks and M4 macro arguments quoted
- Error message normalized without checking other errors appended (once
  more dependencies were required and additional error messages were
  appended)
2024-07-02 12:38:09 +02:00
Peter Kokot
a071d1c9cf
Autotools: Refactor PS_STRINGS check in cli (#14763)
- over-quoted arguments reduced
- AS_VAR_IF used
- php_cv_var_PS_STRINGS cache variable name used instead of cli_cv_*
- Macro help text synced according to empty definition
2024-07-02 12:37:33 +02:00
Niels Dossche
fa5e29f7d0 Remove always-false if check
prop_info is NULL in this branch.
2024-07-02 02:51:18 -07:00
Niels Dossche
00691f4322 Remove always-true if check 2024-07-02 02:51:18 -07:00
Niels Dossche
00b36ce44a Remove always-false opcode check
opcode cannot be ZEND_POST_INC because of the if check above.
2024-07-02 02:51:18 -07:00
Niels Dossche
7407e760f1 Remove duplicated code
The exact same code already exists above this.
2024-07-02 02:51:18 -07:00
Niels Dossche
985e5ffdb0 Remove doubled variable name from assignment 2024-07-02 02:51:18 -07:00
Benjamin Eberlei
72c874691b
RFC: Add #[\Deprecated] Attribute (#11293)
see https://wiki.php.net/rfc/deprecated_attribute

Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2024-07-02 09:44:25 +02:00
Peter Kokot
8291e81c00
Remove unused ZEND_JIT_IR (#14760)
Symbol was added when PHP-8.3 JIT engine was used with the IR JIT and is
now unused and redundant.
2024-07-02 08:19:45 +02:00
Peter Kokot
5e27a2a994
Autotools: Simplify SAPI configure log check messages (#14764)
The PHP_ARG_ENABLE and PHP_ARG_WITH 2nd argument is the check message in
the configure log output.
2024-07-02 08:11:10 +02:00
Peter Kokot
2c20811942
Autotools: Remove unused PHPDBG_SHARED compile definition (#14762)
There was also redundant backslash escaping.
2024-07-02 07:13:01 +02:00
Peter Kokot
bee84c0468
Autotools: Quote PHP_SUBST arguments in extensions (#14748) 2024-07-02 06:56:18 +02:00
Peter Kokot
b9f8113a48
Autotools: Quote PHP_SUBST arguments in configure.ac (#14757) 2024-07-02 05:44:45 +02:00
Peter Kokot
7711bdcfba
Autotools: Quote PHP_SUBST arguments in php.m4 (#14758) 2024-07-02 05:44:02 +02:00
Peter Kokot
9674a421b7
Autotools: Move openpty check to libraries section (#14737)
This is just a sync and alignment with Autoconf documentation style
order of checks in configure.ac ("Standard configure.ac Layout"):
https://www.gnu.org/software/autoconf/manual/autoconf-2.72/autoconf.html#Autoconf-Input-Layout
2024-07-02 05:41:13 +02:00
Peter Kokot
2e756e0086
Remove unused PTHREADS CPP macro definition (#14759) 2024-07-02 05:40:18 +02:00
Peter Kokot
1f2948a966
Sync PHP_SUBST in phpize.m4 (#14756)
- Arguments quoted
- Duplicate redundant prefix variable substitution removed
2024-07-01 23:15:44 +01:00
David Carlier
66a06d6fa5
Merge branch 'PHP-8.3' 2024-07-01 22:38:05 +01:00
David Carlier
20866b37aa
Merge branch 'PHP-8.2' into PHP-8.3 2024-07-01 22:37:54 +01:00
David Carlier
2edf12e87f
Fix GH-14638: null dereference after XML parsing failure.
object document is null if the parsing had failed prior to cast to
string.
2024-07-01 22:36:32 +01:00
Peter Kokot
2b2f755a11
Merge branch 'PHP-8.3'
* PHP-8.3:
  Use pattern tags for NDBM ext/dba/tests (#14755)
2024-07-01 22:06:41 +02:00
Peter Kokot
df37671bb9
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use pattern tags for NDBM ext/dba/tests (#14755)
2024-07-01 22:06:24 +02:00
Peter Kokot
98cb0be17d
Use pattern tags for NDBM ext/dba/tests (#14755) 2024-07-01 22:06:10 +02:00
Peter Kokot
e9a9a2bf81
Autotools: Sync PHP_SUBST in ext/odbc (#14749)
- Argument quoted
- ODBC_INCDIR and ODBC_LIBDIR are not used in the generated Makefile
2024-07-01 21:16:21 +02:00
Peter Kokot
dc1cc503db
Autotools: Sync PHP_SUBST in sapi (#14753)
- Arguments quoted
- Redundant comments removed (some basic help info is in the
  build/php.m4)
- APXS variable as such isn't used in the generated Makefile, the path
  to the apxs tool is inserted during the configure step directly
2024-07-01 21:04:09 +02:00
Peter Kokot
034621760d
Autotools: Sync PHP_SUBST in ext/gd (#14751)
- Argument quoted
- CFLAGS variable changed into normal shell variable
- GDLIB_CFLAGS and GDLIB_LIBS are not used in the generated Makefile
2024-07-01 20:57:43 +02:00
Niels Dossche
0c5d3db79b
Fix includes for separate builds for ext/dom (#14752)
* Update include declaration in Dom css selectors

May fix 88da914910 (r143708340)

* Remove pointless guards

* Fix Windows build

* Use relative path
2024-07-01 20:22:58 +02:00
Niels Dossche
1d905442e5
[ci skip] Add missing simplexml entry to dom test 2024-07-01 20:20:38 +02:00
David Carlier
1bcb57dcab
ext/sockets: socket_accept setting fcntl's FD_CLOEXEC on unixes.
mainly for scenarios when pcntl_fork/pcntl_exec are involved so when
the latter is executed, we avoid unwarranted effects with the file
descriptors, instead the socket will be closed on success.

close GH-14606
2024-07-01 18:50:59 +01:00
Peter Kokot
72326362d7
Sync PHP_SUBST_OLD (#14746)
- All arguments quoted
- PHP_VERSION, PHP_VERSION_ID, PHP_LDFLAGS are used only in templates
  with @...@ placeholders
- These are not used in generated Makefile neither in templates:
  abs_builddir, abs_srcdir, DEBUG_CFLAGS
- These are used only in generated Makefile: EXTRA_LDFLAGS,
  EXTRA_LDFLAGS_PROGRAM, ZEND_EXTRA_LIBS, INCLUDES, EXTRA_INCLUDES,
  INSTALL_IT, NATIVE_RPATHS
2024-07-01 19:28:20 +02:00
tekimen
042ae1559e
[ci skip] Revert2: Add Hamada-san to CODEOWNERS for mbstring (#14744)
This reverts commit 1b47fd026a.
I (@youkidearitai) join to CODEOWNERS for mbstring.
2024-07-01 07:50:07 -07:00
Peter Kokot
ebad61de2d
Autotools: Quote AC_SUBST arguments (#14743) 2024-07-01 14:07:26 +02:00
Peter Kokot
bf139e9b1f
Remove unused defined CPP macros in fpm SAPI (#14740)
* Remove unused defined CPP macros in fpm SAPI

- PHP_FPM_SYSTEMD
- PHP_FPM_USER
- PHP_FPM_GROUP

* [skip ci] Update UPGRADING.INTERNALS
2024-07-01 14:06:45 +02:00
Peter Kokot
9caad3745d
Autotools: Refactor Valgrind support (#14736)
When Valgrind is enabled and not found on the system, default error can
be thrown by PKG_CHECK_MODULES instead of writing a manual error step.
- This uses less redundant variables and has synced CS.
- AS_VAR_IF used instead of raw shell ifs
- Added some basic help descriptions for macro definitions
2024-07-01 00:29:44 +02:00
Niels Dossche
445c1c920b
Update Lexbor (#14735)
Until commit aaa722f9a44a486f361e4266ff322afcf7d6421a
This pulls in some upstream fixes, including some of mine.
2024-06-30 20:01:27 +02:00
Niels Dossche
c97885b3cc
Merge branch 'PHP-8.3'
* PHP-8.3:
  Factor out common check for short-circuited ast
  Fix OSS-Fuzz #69765: Yield reference to nullsafe chain
2024-06-30 13:38:58 +02:00
Niels Dossche
015b5195ae
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Factor out common check for short-circuited ast
  Fix OSS-Fuzz #69765: Yield reference to nullsafe chain
2024-06-30 13:38:44 +02:00
Niels Dossche
8fd095669a
Factor out common check for short-circuited ast 2024-06-30 13:38:14 +02:00
Niels Dossche
d568337680
Fix OSS-Fuzz #69765: Yield reference to nullsafe chain
You cannot return or yield a reference to a nullsafe chain. This was
checked already in zend_compile_return but not yet in
zend_compile_yield.

Closes GH-14716.
2024-06-30 13:38:06 +02:00
Peter Kokot
212b2834e9
Autotools: Sync indentation style in build system files (#14725) 2024-06-29 23:25:17 +02:00
Niels Dossche
4df90af44f
Update Lexbor (#14729) 2024-06-29 22:42:56 +02:00
Kamil Tekiela
62a3bbd0e3
Remove MYSQLI_SET_CHARSET_DIR (#14724) 2024-06-29 22:21:03 +02:00
Niels Dossche
88da914910 Implement CSS selectors 2024-06-29 13:00:26 -07:00
Niels Dossche
7defc23532 Import Lexbor CSS component and update the patches for it 2024-06-29 13:00:26 -07:00