Commit graph

136975 commits

Author SHA1 Message Date
Dmitry Stogov
7b25cac32b
Update IR
IR commit: 8fb33ceccd39d0052c5949cf96fc135e7ba1fbcb
2024-07-22 09:43:11 +03:00
lwlinux
15470bd16c
sapi/cli/php_cli.c: fix typos (#15057) 2024-07-22 06:41:02 +01:00
Peter Kokot
9f74329bb6
Merge branch 'PHP-8.3'
* PHP-8.3:
  Append -Wno-implicit-fallthrough flag conditionally (#13331)
2024-07-22 07:02:25 +02:00
Peter Kokot
f702437cad
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Append -Wno-implicit-fallthrough flag conditionally (#13331)
2024-07-22 06:58:01 +02:00
Peter Kokot
d20d11375f
Append -Wno-implicit-fallthrough flag conditionally (#13331)
Older GCC versions (< 7.0) don't support the -Wno-implicit-fallthrough
compiler flag. This adds the flag conditionally in case some other
compiler will run into same issue.

Fixes GH-13330
2024-07-22 06:57:04 +02:00
Peter Kokot
e6089b0920
Add upgrading note about Autoconf cache variables (#14985)
[skip ci]
2024-07-22 02:10:48 +02:00
Peter Kokot
90e63d8a94
[skip ci] Remove GH-14685 artefact 2024-07-22 00:57:34 +02:00
Niels Dossche
af830d866f
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
2024-07-21 22:03:06 +02:00
Niels Dossche
c26d1a36e2
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
2024-07-21 22:02:47 +02:00
Niels Dossche
cfcc2a3fda
Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
We were using atoi, which is only for integers. When the size does not
fit in an integer this breaks. Use ZEND_STRTOUL instead. Also make sure
invalid data isn't accidentally parsed into a file size.

Closes GH-15035.
2024-07-21 22:02:11 +02:00
Niels Dossche
9b78e5ff1c Remove useless return 2024-07-21 18:36:19 +02:00
Niels Dossche
186788f149 Fix error handling in tidy constructor 2024-07-21 18:36:19 +02:00
Niels Dossche
1d045a5c97 Use RETVAL_BOOL or RETURN_BOOL in ext/tidy 2024-07-21 18:36:19 +02:00
Niels Dossche
09c0455f64 Consistently check zend_result in the same way 2024-07-21 18:36:19 +02:00
Niels Dossche
e736d7cd8a Make more pointers const in ext/tidy 2024-07-21 18:36:19 +02:00
David Carlier
f6940b9239
[ci skip] NEWS update 2024-07-21 17:16:43 +01:00
Niels Dossche
c952f5625a
Update Lexbor
Upstream commit 48afb625af9178d1929ec81349f173116b136310.
2024-07-21 18:08:59 +02:00
David Carlier
3713c02803
sapi/fpm: retiring solaris /dev/poll support proposal.
Since Solaris 10, the port API is supported, is more modern, less bug
prone and offers, on average, better performances.

Close GH-14685
2024-07-21 17:03:41 +01:00
Niels Dossche
9435f4d55b
Throw instead of silently failing when creating a too long text node
Lower branches suffer from this as well but we cannot change the
behaviour there.
We also add NULL checks to check for allocation failure.

Closes GH-15014.
2024-07-21 17:08:06 +02:00
Niels Dossche
c4e1f2b4e8
Factor out object creation code in ext/tidy 2024-07-21 17:01:47 +02:00
Niels Dossche
551c4a3bf8
Use OBJ_RELEASE instead of ZVAL_OBJ + zval_ptr_dtor in php_dom.c (#15052) 2024-07-21 16:57:05 +02:00
Niels Dossche
d14b936d4f
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix memory leaks in ext/tidy basedir restriction code
2024-07-21 16:28:51 +02:00
Niels Dossche
74de766d41
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leaks in ext/tidy basedir restriction code
2024-07-21 16:28:45 +02:00
Niels Dossche
8de7ccb29b
Fix memory leaks in ext/tidy basedir restriction code
TIDY_APPLY_CONFIG can early return because it's a macro, but then the
cleanup paths are not executed. Transform this to a real function and
handle the cleanups correctly at the callsites.

Closes GH-15046.
2024-07-21 16:28:15 +02:00
Niels Dossche
d5faf44e90
Remove bogus tree setting code from parentnode/tree.c (#15044)
I don't know why this code was here in the first place, it is present
since the initial implementation. It doesn't make sense because:
1. It would require updating the refcounts if the document wasn't
   actually already set.
2. We enforce that the document is the same as the target document by
   this point, so setting the tree is pointless.
2024-07-21 13:53:12 +02:00
Peter Kokot
c4546d4923
Autotools: Sync CS in ext/standard process check (#15049)
- AC_* macros simplified and arguments quoted
2024-07-21 08:38:06 +02:00
Peter Kokot
97afc86437
Autotools: Quote M4 arguments (#15045)
- AC_MSG_CHECKING
- AC_MSG_RESULT
- AC_MSG_WARN
- AC_MSG_ERROR
- AC_MSG_NOTICE
2024-07-21 01:52:17 +02:00
David Carlier
ba54cebb44
ext/pgsql: pg_convert/pg_insert/pg_update/pg_delete caching regexes.
Close GH-15039
2024-07-20 23:04:48 +01:00
Niels Dossche
2cfcfe09a0
Convert more common methods in dom/node.c to fast ZPP (#15043) 2024-07-20 20:20:32 +02:00
Niels Dossche
29466223d0 Move stricterror fetch to dom_child_removal_preconditions() body 2024-07-20 20:01:55 +02:00
Niels Dossche
74116a4ade Remove impossible condition
The parent's child must exist because otherwise this node could not have
a parent node.
2024-07-20 20:01:55 +02:00
Saki Takamachi
1fc2ddc996
random: Optimize Randomizer::getBytesFromString() (#14894)
Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2024-07-20 15:42:47 +02:00
Peter Kokot
68ae477796
Autotools: Quote M4 arguments (#15033)
- PHP_ADD_INCLUDE
- PHP_EVAL_INCLINE
- PHP_EVAL_LIBLINE
2024-07-20 07:21:44 +02:00
David CARLIER
39b1006306
ext/pgsql: db metadata simplification for table names. (#15036) 2024-07-19 22:47:52 +01:00
Calvin Buckley
a63fd2a95a
Gate SOCK_DCCP behind its own ifdef (#15031)
AIX 7.1 has SOCK_CONN_DGRAM, but not SOCK_DCCP; the previous change
conflated the availability between the two definitions. Add an
additional #ifdef for this.
2024-07-19 16:41:29 -03:00
Peter Kokot
6857c7c8d6
Autotools: Expand m4_normalize sooner (#15018)
Quoted m4_normalize will expand and change its argument later in the
macro call when M4 is processing the *.m4 sources. Without quotes the
already normalized string is passed to the macro directly. In these
specific cases generated configure script is the same. This is more for
consistency to have this synced and not repeat the pattern too much
in the future when copy/pasting. Note, that many AC_* macros require
similar behavior already (for example, AC_CHECK_FUNCS.)
2024-07-19 15:20:04 +02:00
Niels Dossche
442ae96444
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15028: Memory leak in ext/phar/stream.c
  Fix GH-15023: Memory leak in Zend/zend_ini.c
  Fix GH-15020: Memory leak in Zend/Optimizer/escape_analysis.c
2024-07-19 14:59:57 +02:00
Niels Dossche
f21947a7ae
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15028: Memory leak in ext/phar/stream.c
  Fix GH-15023: Memory leak in Zend/zend_ini.c
  Fix GH-15020: Memory leak in Zend/Optimizer/escape_analysis.c
2024-07-19 14:59:44 +02:00
Niels Dossche
5996227f88
Fix GH-15028: Memory leak in ext/phar/stream.c
Closes GH-15029.
2024-07-19 14:58:28 +02:00
Niels Dossche
8c19efdc97
Fix GH-15023: Memory leak in Zend/zend_ini.c
Closes GH-15024.
2024-07-19 14:57:19 +02:00
Niels Dossche
03d73182d9
Fix GH-15020: Memory leak in Zend/Optimizer/escape_analysis.c
Closes GH-15022.
2024-07-19 14:56:28 +02:00
Niels Dossche
d75abdcec4
Add assertion to error path in streams.c (#15027)
This makes the developer intent clear and should prevent some false
reports.
2024-07-19 14:51:54 +02:00
Christoph M. Becker
004f3d5eef
Merge branch 'PHP-8.3'
* PHP-8.3:
  Update the php-sdk-binary-tools to php-sdk-2.3.0
2024-07-19 12:26:32 +02:00
Christoph M. Becker
94172b05d0
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update the php-sdk-binary-tools to php-sdk-2.3.0
2024-07-19 12:18:26 +02:00
Christoph M. Becker
93a9a9b4a4
Update the php-sdk-binary-tools to php-sdk-2.3.0
The Windows CI of the `PHP-8.2` to `PHP-8.3` branches still use the
`php-sdk-2.2.0` which is almost five years old, and does not fetch the
updated dependencies from https://downloads.php.net/~windows.

The `master` branch CI uses `php_downloads_server_migration_v1`, which
has been superseded a few months ago[1].  So switching to the
`php-sdk-2.3.0` makes sense there, too.

[1] <php/php-sdk-binary-tools@19c8ccb>

Closes GH-14991.
2024-07-19 12:17:39 +02:00
Arnaud Le Blanc
1fbb666545
Use zend_std_build_properties() to access zend_object.properties
The zend_object.properties HashTable needs to be built just in time by calling
rebuild_object_properties() on the object before accessing it. Normally this is
done automatically in zend_std_get_properties(), but we do it manually in a few
places.

In this change I introduce an inline variant of zend_std_build_properties(), and
refactor these places to use it instead of calling rebuild_object_properties()
manually.

rebuild_object_properties() renamed as rebuild_object_properties_internal(), to
enforce usage of zend_std_get_properties() or zend_std_build_properties_ex().

Closes GH-14996
2024-07-18 22:18:38 +02:00
Peter Kokot
436baae172
[skip ci] Sync HAVE_SIGSETJMP removal
This adds notice in the UPGRADING.INTERNALS file and removes redundant
undefinition from Windows config header.

Follow-up of GH-14942.
2024-07-18 22:15:33 +02:00
Peter Kokot
b9e1ea33b9
[skip ci] Trim trailing whitespace in *.m4 2024-07-18 22:11:13 +02:00
Niels Dossche
80a4783d25
Deduplicate NULL checks in ext/dom (#15015)
This introduces a new helper php_dom_create_nullable_object() that does
the NULL check and puts NULL in return_value. Otherwise it runs
php_dom_create_object(). This deduplicates a bit of code.
2024-07-18 21:20:03 +02:00
Niels Dossche
27205bd3c3
Cleanup DOMAttr::isId() (#15016) 2024-07-18 21:19:54 +02:00