Commit Graph

137547 Commits

Author SHA1 Message Date
Niels Dossche
6a07400699
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
2024-08-23 19:43:32 +02:00
Niels Dossche
8a00faa2bb
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
2024-08-23 19:42:36 +02:00
Niels Dossche
9af574c26e
Fix GH-15551: Segmentation fault (access null pointer) in ext/dom/xml_common.h
Closes GH-15556.
2024-08-23 19:40:42 +02:00
Niels Dossche
d32b97a1c7
Fix NULL pointer dereference with NULL content in legacy nodes in title getting (#15558) 2024-08-23 19:38:13 +02:00
Niels Dossche
7ae7b4e388
Correctly specify secret instead of seed in ext/hash deprecation message (#15557)
Reference: 74eff98c84 (r145528001)
2024-08-23 19:37:57 +02:00
Gina Peter Bnayard
f9c69bc392 ext/phar: Reorganise some headers 2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
d55074ede4 ext/phar: Use zend_string instead of char* len pair 2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
51bb8cfcb5 ext/phar: Add some const qualifiers 2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
6f986837ec ext/phar: Simplify a return condition in Phar::offsetExists() 2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
20f7e08687 ext/phar: Use more specialized types instead of int 2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
81d232fed5 ext/phar: Move some header functions into util.c
They were only used there, therefore mark them static
2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
d015af60df ext/phar: Adjust return types for methods that always return true 2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
03be1ac0ad ext/phar: Refactor part of tar.c 2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
009039d447 ext/phar: Use size_t for string lenghts
And remove useless casts
2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
947f72c181 ext/phar: Use standard naming for PHP functions 2024-08-23 17:42:37 +01:00
Gina Peter Bnayard
937c4e4ac6 ext/hash: Make return type zend_result for serialize function typedef 2024-08-23 17:41:33 +01:00
Gina Peter Bnayard
c26e77c4c5 ext/hash: Specialize copy function typedef 2024-08-23 17:41:33 +01:00
Peter Kokot
babf18c52e
Autotools: Remove obsolete compiler reset (#15549)
This was once added via 827ad656cb to
store the compiler variable when being modified due to using libtool
passing pthread_cflags to linker.
2024-08-23 16:54:21 +02:00
Peter Kokot
062e9f9134
Remove unused buffer variables (#15550)
These emit warning: unused variable 'buffer'.
2024-08-23 16:40:19 +02:00
Gina Peter Banyard
d9695401e4
Zend: Voidify virtual_cwd_(de)activate() (#15554)
It always returned 0
2024-08-23 15:28:37 +01:00
Ilija Tovilo
8fcf34d598
Remove ZEND_ACC_ABSTRACT from prop variance check
Abstract properties are now virtual, unless they actually contain concrete hook
implementations using the backing field.
2024-08-23 16:13:23 +02:00
Máté Kocsis
7e45e57d8f
Suppress deprecation notices when ext/dom properties are accessed by the get_debug_info handler (#15530) 2024-08-23 10:39:11 +02:00
Niels Dossche
793f6321e7
Fix NULL pointer dereference with NULL content in legacy nodes (#15546) 2024-08-23 08:56:06 +02:00
Jakub Zelenka
d6c06edaec
[skip ci] Update NEWS with info about GH-14930 fix which is only in master now 2024-08-22 23:50:11 +01:00
Jakub Zelenka
40e48920b9
Merge branch 'PHP-8.3' 2024-08-22 23:45:35 +01:00
Jakub Zelenka
70c5e366f6
Revert fix for GH-14930: truncating readdir output (#15533) 2024-08-22 23:41:34 +01:00
Peter Kokot
f952263bcd
Fix Solaris 10 build: missing libproc.h (#15525)
The libproc.h header file was added on Solaris as of 11.4.

* Also add guard check to the entire function
* When libproc.h isn't available also sys/procfs.h is redundant
* Move the <sys/lwp.h> out of the guard
* Exclude more stuff from Solaris 10
2024-08-22 20:26:44 +02:00
Go Kudo
0c73553959
Update extension skeleton .gitignore (#15542)
[ci skip]
2024-08-22 19:31:06 +02:00
Peter Kokot
c79e723725
Autotools: Check re2c version with AS_VERSION_COMPARE (#15465)
This simplifies the version check a bit.
2024-08-22 17:39:03 +02:00
Peter Kokot
1b3c204033
Autotools: Add min-version argument to PHP_PROG_PHP macro (#15477)
This makes a bit simpler to use this macro by optionally passing the
required minimum PHP version. If version is not passed it falls back
to 7.4 as before. Minimum version also added to configure.ac.
2024-08-22 17:30:08 +02:00
Peter Kokot
4e193b4113
Autotools: Move abs_srcdir and abs_builddir to init macro (#15537)
This syncs the abs_srcdir and abs_builddir variables assignments between
the php-src build and phpize. The `&&` was picked over `;` as it is more
rigorous - the pwd command would fail if cd fails for some reason.
2024-08-22 16:26:48 +02:00
Peter Kokot
e7874f2089
Autotools: Move Zend/zend_config.h to AC_CONFIG_COMMANDS (#15538)
Instead of creating Zend/zend_config.h header file in an initialization
argument of "default" commands, this creates it in its own wrapper
when config.status is called.
2024-08-22 16:26:28 +02:00
Christoph M. Becker
6a51062c85
Drop unused, but confusing macro definition (GH-15541)
`PHP7DLLTS_EXPORTS` is not used throughout php-src, and it's unlikely
that it is used by any extension, especially since it still refers to
PHP 7.  The symbol had been introduced in 2014[1], but is not even used
in latest PHP-7.4; probably it was just supposed to be used, or part of
phpng.

[1] <fc734cf95d>

Since CI already ran for the PR, we can now [skip ci].
2024-08-22 14:58:55 +02:00
Gina Peter Banyard
35fbb0061d
main/network: Use more appropriate types (#15511)
* main/network: Use more appropriate types

And check directly against 0 for success for functions not returning a zend_result

* Remove redundant declaration in file.h

Not sure why it even is here
2024-08-22 12:48:28 +01:00
Gina Peter Banyard
15ea82da2b
ext/mysqli: Minor clean-up (#15526)
It is likely that more functions should have their return type changed to `enum_func_status` and have the return value checked against `PASS`/`FAIL` rather than assuming the inverse of boolean logic.
2024-08-22 12:34:57 +01:00
Christoph M. Becker
e5a30274d8
Support AVX-512 builds on Windows (GH-15159)
"Since limited support for `/arch:AVX512` was added in Visual Studio
2017, and expanded in Visual Studio 2019"[1], we can safely offer this
option, since PHP 8.4 is supposed to build with Visual Studio 2022, and
it is unlikely that someone tries to build PHP 8.4 with Visual Studio,
requesting AVX-512 support.

[1] <https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170>
2024-08-22 13:06:28 +02:00
Christoph M. Becker
450740cbb6
[skip ci] Fix typos in XFAIL reasons 2024-08-22 11:48:46 +02:00
Jorg Adam Sowa
ff69f334f1
ext/session: Warn when providing invalid values for session.gc_probability and session.gc_divisor 2024-08-22 01:29:40 +01:00
Peter Kokot
6b809c8890
Autotools: Fix stack direction check (#15528)
On Solaris 10 and GCC 4.9 check failed with error in config.log:
error: missing binary operator before token "("

The __has_builtin must be checked in its own `#ifdef/defined` line
above the `#if __has_builtin(....` usage.
2024-08-21 22:50:11 +02:00
Gina Peter Bnayard
5853cdb73d Use "must not" instead of "cannot" wording 2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
c811d58953 ext/pcntl: Use standard wording for ValueError 2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
9a2fdbec48 ext/mbstring: Use standard wording for ValueError 2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
997199e938 ext/standard/string.c: use standard wording for ValueError in str_pad() 2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
6d9a74cde0 ext/dom: Use standard wording for ValueError 2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
ad8480304d ext/dba: Remove duplicate check for empty mode 2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
f6c464fee5 ext/gettext: Remove duplicate domain length checks
It not being empty is already checked by PHP_GETTEXT_DOMAIN_LENGTH_CHECK()
2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
10738141d7 ext/standard/exec.c: Use ZPP path modifier to check for nul bytes 2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
e7c4d54d65 Use new helper function for "cannot be empty" ValueErrors 2024-08-21 21:12:17 +01:00
Gina Peter Bnayard
96d572a18e Zend: Add helper for "cannot be empty" ValueError 2024-08-21 21:12:17 +01:00
Peter Kokot
602a4ac735
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix bug GH-15514 (Configure error: genif.sh: syntax error)

Autotools: Refactor main/internal_functions commands

This wraps generation of main/internal_functions* files into a separate
AC_CONFIG_COMMANDS and uses a SHELL variable instead of sh command.
Autoconf sets the SHELL variable to a suitable current shell the
configure is running in.

Instead of putting the commands into the 2nd argument the 3rd
initialization argument is used like before because it is easier to read
and work with variables (AWK, EXT_STATIC and EXT_CLI_STATIC), which
would need to be assigned again for the 2nd argument.

This simplifies the configure usage on Solaris 10 C shell and KornShell
without issuing errors when executing genif.sh script.
2024-08-21 18:20:42 +02:00