1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

138776 Commits

Author SHA1 Message Date
Christoph M. Becker
c2459d8cc2 Merge branch 'PHP-8.4'
* PHP-8.4:
  Free internal_runtime_cache on shutdown for NTS
2024-10-21 11:39:20 +02:00
Christoph M. Becker
fd39e230fd Free internal_runtime_cache on shutdown for NTS
As is, the `internal_runtime_cache` is only free for ZTS builds; we
also free it for NTS builds on shutdown.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>

Closes GH-16402.
2024-10-21 11:38:52 +02:00
Christoph M. Becker
514c2b3587 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16390: dba_open() can segfault for "pathless" streams
2024-10-21 00:38:54 +02:00
Christoph M. Becker
2c0fd883b2 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16390: dba_open() can segfault for "pathless" streams
2024-10-21 00:38:18 +02:00
Christoph M. Becker
e635857f7d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16390: dba_open() can segfault for "pathless" streams
2024-10-21 00:33:29 +02:00
Christoph M. Becker
d3b0efe9d7 Fix GH-16390: dba_open() can segfault for "pathless" streams
`dba_open()` accepts arbitrary stream wrapper paths, but unless no
locking (`-`) is specified, we try to determine the underlying file
path.  If that fails, we need to error out.

Closes GH-16498.
2024-10-21 00:21:34 +02:00
David Carlier
c025ce4d66 Merge branch 'PHP-8.4' 2024-10-20 21:44:41 +01:00
David Carlier
bde23d0843 Merge branch 'PHP-8.3' into PHP-8.4 2024-10-20 21:44:04 +01:00
David Carlier
d6bac2f7e8 Merge branch 'PHP-8.2' into PHP-8.3 2024-10-20 21:43:51 +01:00
David Carlier
9ca68e037c Fix GH-16501: gmp_random_bits overflow.
we do the same calculation in advance as mpz_realloc overflow check to
avoid abort.

close GH-16503
2024-10-20 21:43:29 +01:00
Christoph M. Becker
01aeaf2e95 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16414: zend_test.observer.observe_function_names may segfault
2024-10-20 12:11:42 +02:00
Christoph M. Becker
909cecb7fa Fix GH-16414: zend_test.observer.observe_function_names may segfault
Unless `zend_test.observer.enabled` is on, we must not add observer
handlers, so we let the INI modify handler fail early.

We also need to ensure that the functions to observe have already been
called, so that their begin and end handlers are properly initialized.
Otherwise we will not observe the function execution, but a segfault.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>

Closes GH-16438.
2024-10-20 12:11:08 +02:00
Christoph M. Becker
ae717797e5 Fix Windows x86 build for ext/ffi
PR #16351 introduced `EnumProcessModules()` calls, but this function is
undefined; thus, the compiler mangles the name according to the default
calling convention.  This lets linking succeed for x64, but fail for
x86.

To properly fix this, we include <Psapi.h> where the function is
declared.
2024-10-20 11:57:44 +02:00
Christoph M. Becker
d19fdaa4b7 Drop legacy fallback for isc_get_client_version() (GH-16343)
The respective code had been introduced 20 years ago, and we can assume
that the function is available at least of Firebird 3.0, what we
require anyway.
2024-10-19 16:05:46 +02:00
Christoph M. Becker
db991bc0f1 FFI: support symbol lookup without specifying lib on Windows
This works similar to `dlsym(RTLD_DEFAULT, …)` with the caveat that
symbols on Windows may not be unique, and are usually qualified by the
module they are exported from.  That means that wrong symbols may be
fetched, potentially causing serious issues; therefore this usage is
not recommended for production purposes, but is a nice simplification
for quick experiments and the ext/ffi test suite.

Closes GH-16351.
2024-10-19 15:36:49 +02:00
Christoph M. Becker
9504fcfc0f Move ARG_ENABLE() "macros" out of confutils.js (GH-16398)
While these "macros" work perfectly fine in confutils, it is somewhat
strange to have these two there, while all others are in config.w32
files.

In particular, there is no need for a `MODE_PHPIZE` guard, since there
are already config.w32 and config.w32.phpize.in.

However, we need to replace the semicolon in the helptext, because the
regex which parses ARG_(ENABLE|WITH) calls is restricted, and does not
accept semicolons.
2024-10-19 15:26:53 +02:00
Ilija Tovilo
a00c73458f [skip ci] Fix test expectation for Windows
No clue why the line reports 0 on Windows...
2024-10-18 23:31:18 +02:00
Daniel Scherzer
cb1d4ba97a GH-16315: Improve error messages when extending enums
Closes GH-16491
2024-10-18 22:22:54 +02:00
Ilija Tovilo
4704f00fc2 Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Mark another phar test as flaky on macOS
2024-10-18 15:25:02 +02:00
Ilija Tovilo
fe310181e4 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Mark another phar test as flaky on macOS
2024-10-18 15:24:55 +02:00
Ilija Tovilo
ce44a7f95c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Mark another phar test as flaky on macOS
2024-10-18 15:24:44 +02:00
Ilija Tovilo
062837aa13 [skip ci] Mark another phar test as flaky on macOS 2024-10-18 15:24:15 +02:00
Derick Rethans
b63167f9e6 Merge branch 'PHP-8.4' 2024-10-18 12:38:28 +01:00
Derick Rethans
9923e14d97 Merge branch 'PHP-8.3' into PHP-8.4 2024-10-18 12:38:21 +01:00
Derick Rethans
8acdde5b10 Merge branch 'PHP-8.2' into PHP-8.3 2024-10-18 12:38:06 +01:00
Derick Rethans
b2b294a2b2 Fixed bug GH-16037 (Assertion failure in ext/date/php_date.c) 2024-10-18 12:37:03 +01:00
Christoph M. Becker
a920afd2d2 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16454: Unhandled INF in date_sunset() with tiny $utcOffset
2024-10-18 13:25:41 +02:00
Christoph M. Becker
66fe549daf Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16454: Unhandled INF in date_sunset() with tiny $utcOffset
2024-10-18 13:25:05 +02:00
Christoph M. Becker
64f312f123 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16454: Unhandled INF in date_sunset() with tiny $utcOffset
2024-10-18 13:22:55 +02:00
Christoph M. Becker
9bc34182b6 Fix GH-16454: Unhandled INF in date_sunset() with tiny $utcOffset
After normalization, `N` is supposed to be in range [0, 24], but for
very large and very small `$utcOffset` this is not necessarily the
case, since the normalization might yied `-inf` or `inf`.  If that
happens, we let the function fail silently, since it is highly unlikely
that such `$utcOffset`s are passed in practice.

Closes GH-16483.
2024-10-18 13:21:57 +02:00
Dmitry Stogov
e61e2c1eb8 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix invalid target opline with jit->reuse_ip active (#16457)
2024-10-18 12:52:45 +03:00
Dmitry Stogov
8b5668efef Fix invalid target opline with jit->reuse_ip active (#16457)
This is an alternative for #16440
2024-10-18 12:48:23 +03:00
Gina Peter Banyard
42e179ef9d ext/soap: Minor refactoring to wsdl_message() 2024-10-17 22:46:34 +01:00
Gina Peter Banyard
d48bc086d3 ext/soap: Reduce scope and use proper names for XML attribute variables 2024-10-17 22:46:34 +01:00
Gina Peter Banyard
617136296c ext/soap: Indentation fix 2024-10-17 22:46:34 +01:00
Gina Peter Banyard
f0a35e2cd2 ext/soap: Check services are not empty via an if guard 2024-10-17 22:46:34 +01:00
Gina Peter Banyard
81132bb2f4 ext/soap: Eliminate some variable shadowing 2024-10-17 22:46:34 +01:00
Gina Peter Banyard
cfe2e1130e ext/soap: Use bool instead of int 2024-10-17 22:46:34 +01:00
Gina Peter Banyard
5e7c876282 ext/soap: Replace memset with 0 initialization 2024-10-17 22:46:34 +01:00
Gina Peter Banyard
e2dee956b8 ext/soap: Reduce scope of variable 2024-10-17 22:46:34 +01:00
Gina Peter Banyard
6ddab74d55 sapi: Fix some variable shadowing (#16485)
sapi_module, mime_type_map, zend_extensions, php_cgi_globals, and phpdbg_globals are true globals which are being shadowed
2024-10-17 22:46:23 +01:00
Niels Dossche
b6f59d2a6b Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16473: dom_import_simplexml stub is wrong
2024-10-17 23:28:59 +02:00
Niels Dossche
55266d420b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16473: dom_import_simplexml stub is wrong
2024-10-17 23:28:34 +02:00
Niels Dossche
c26d5f20e8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16473: dom_import_simplexml stub is wrong
2024-10-17 23:27:23 +02:00
Niels Dossche
41af9335b7 Fix GH-16473: dom_import_simplexml stub is wrong
It's been wrong since PHP 8.0 at least, and the signature was inherited
in 8.4-dev to the new DOM methods.

Closes GH-16489.
2024-10-17 23:26:50 +02:00
Niels Dossche
7aeafe4bae Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-16406: Assertion failure in ext/phar/phar.c:2808
2024-10-17 21:24:13 +02:00
Niels Dossche
d8e516631f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-16406: Assertion failure in ext/phar/phar.c:2808
2024-10-17 21:24:08 +02:00
Niels Dossche
25817ad298 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-16406: Assertion failure in ext/phar/phar.c:2808
2024-10-17 21:23:47 +02:00
Niels Dossche
6a8d0a054d Fix GH-16406: Assertion failure in ext/phar/phar.c:2808
When copying entries during conversion in phar_convert_to_other(), the
header offset is not reset. This didn't matter in the past as it wasn't
used anyway in the particular use-case, but since 1bb2a4f9 this is
actually used and sanity-checked.

Closes GH-16470.
2024-10-17 21:23:17 +02:00
Niels Dossche
a73754fece Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix various document ref pointer mismanagements
2024-10-17 21:21:56 +02:00