Commit Graph

136771 Commits

Author SHA1 Message Date
Niels Dossche
87599717c9 Avoid pointless duplication in _end_element_handler 2024-07-04 02:21:59 -07:00
Niels Dossche
81cdb8caf2 Remove unused code from xml/compat.c 2024-07-04 02:21:59 -07:00
Peter Kokot
88e36a7d5d
Merge branch 'PHP-8.3'
* PHP-8.3:
  ext/standard/tests: use %d instead of bytes in an overflow message
2024-07-04 00:48:52 +02:00
Peter Kokot
9c460bc65f
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/standard/tests: use %d instead of bytes in an overflow message
2024-07-04 00:48:35 +02:00
Michael Orlitzky
a8d1955348
ext/standard/tests: use %d instead of bytes in an overflow message
In strings/chunk_split_variation1_32bit.phpt, we have a test that is
expected to fail on x32 with a possible integer overflow error. The
message reports the exact number of bytes -- a number big enough to
overflow an int on x32 -- stemming from a memory allocation in
chunk_split().

This number appears unpredictable, and is not the point of the test.
We replace it with %d to make the test independent of the allocation
details.
2024-07-04 00:48:01 +02:00
Peter Kokot
d7cd155e8d
Autotools: Refactor cache variables in configure.ac and ext/ldap (#14784)
- Cache variables ac_cv_ renamed on few places to php_cv_
- Over-quoted arguments reduced
- AS_VAR_IF and CS synced
2024-07-03 21:57:51 +02:00
Peter Kokot
a86163a33c
Autotools: Refactor getaddrinfo check (#14783)
- AS_VAR_IF and AS_CASE used
- CS synced
- Over-quoted arguments reduced
- Cache variable ac_cv_func_getaddrinfo renamed to
  php_cv_func_getaddrinfo
2024-07-03 21:54:13 +02:00
Peter Kokot
a6b336aba6
Refactor HAVE_GETIFADDRS checks (#14787)
- AC_CACHE used with php_cv_func_getifaddrs cache variable
- Synced #if/ifdef/defined checks for HAVE_GETIFADDRS as it is either
  defined to 1 or undefined
2024-07-03 21:53:17 +02:00
David Carlier
0410bf4147
Merge branch 'PHP-8.3' 2024-07-03 18:57:54 +01:00
David Carlier
15bea9ed74
Fix GH-14775: range overflow on negative step.
overflow occurs since we only deal with positive steps.

close GH-14778
2024-07-03 18:57:25 +01:00
Niels Dossche
d80be78efd Stop relying on the deprecated xmlLastError global 2024-07-03 10:34:46 -07:00
Niels Dossche
ef80266d99 Fix double entity encoding in soap 2024-07-03 10:34:46 -07:00
Niels Dossche
173a4033a1 Fix tests for libxml2 2.13.2 2024-07-03 10:34:46 -07:00
Niels Dossche
85705eda71 Fix compilation on libxml2 2.13 2024-07-03 10:34:46 -07:00
Arnaud Le Blanc
0bd260218b
Fix stack limit on ASAN/MSAN (#14771)
Increase the reserved stack size in ASAN builds, as instrumentation use more stack.
Increase the max allowed stack size in some tests, and enable these tests under ASAN.
Use __builtin_frame_address(0), instead of some stack variable, when we need a stack address, as ASAN may store local variables outside of the real stack.
2024-07-03 19:23:34 +02:00
Arnaud Le Blanc
e63e1afd84
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix test race condition
2024-07-03 19:17:59 +02:00
Arnaud Le Blanc
6b54d3b26f
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test race condition
2024-07-03 19:17:43 +02:00
Arnaud Le Blanc
070779c874
Fix test race condition
Closes GH-14790
2024-07-03 19:17:13 +02:00
Peter Kokot
ec277ce7fe
Autotools: Refactor IPv6 check (#14782)
- Configure option and check grouped together for readability
- Cache variable ac_cv_ipv6_support renamed to php_cv_have_ipv6
- AS_VAR_IF used and CS synced
- Over-quoted argument reduced
2024-07-03 14:51:50 +02:00
Peter Kokot
063213b1ae
Autotools: Refactor PCRE JIT checks (#14781)
- Check message moved to 2nd argument of PHP_ARG_WITH
- AH_TEMPLATE takes care of help message defined on one place for both
  defines
- AS_VAR_IF used and CS sycned a bit
- Cache variables renamed to php_cv_*
- Redundant AC_CANONICAL_HOST call removed. The host_cpu is set together
  with a triplet in PHP_CANONICAL_HOST_TARGET
- Over-quoted arguments reduced
2024-07-03 14:10:29 +02:00
Peter Kokot
dc7b67ebc3
Autotools: Sync PHP_ADD_MAKEFILE_FRAGMENT (#14766)
- Macro help text updated for extensions and general usage
- Arguments quoted
- dnl removes redundant newlines in the generated configure script
2024-07-03 13:15:13 +02:00
Go Kudo
1fa0db0f83 Merge remote-tracking branch 'upstream/PHP-8.3' 2024-07-03 14:57:20 +09:00
Go Kudo
3f08bcbdf8 Merge remote-tracking branch 'upstream/PHP-8.2' into PHP-8.3 2024-07-03 14:54:07 +09:00
Go Kudo
cd67080236
[ci skip] fix NEWS typo (#14777) 2024-07-03 14:53:33 +09:00
Niels Dossche
fc09f4b2bc
Implement Dom\TokenList (#13664)
Part of RFC: https://wiki.php.net/rfc/dom_additions_84

Closes GH-11688.
2024-07-02 21:34:23 +02:00
Niels Dossche
768900b180 Implement Dom $innerHTML property 2024-07-02 11:15:38 -07:00
Niels Dossche
162e71e165 Update Lexbor
Commit: f0539d137a
2024-07-02 11:15:38 -07:00
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