Commit Graph

136720 Commits

Author SHA1 Message Date
Peter Kokot
1a5c411dc6
Wrap stack direction check in Zend M4 macro (#14694) 2024-06-28 23:07:40 +02:00
Peter Kokot
01b3c05007
Include Zend.m4 with m4_include (#14693)
Zend.m4 is now a collection of only macro definitions.
2024-06-28 22:50:22 +02:00
Peter Kokot
19a9d85d6b
Rely on Autoconf's automatic removal of conftest* files (#14697)
When test programs are finished or when configure script is interrupted,
Autoconf cleans up all conftest* files.
2024-06-28 22:40:38 +02:00
Peter Kokot
2041c133ac
Normalize AC_CHECK_FUNC* first argument (#14700)
The m4_normalize is for Autoconf < 2.70 (on 2.70 and later versions a
blank-or-newline separated items can be expanded without using
backslash-newline).

This also syncs the 1st argument quotes.
2024-06-28 22:40:24 +02:00
Niels Dossche
bcdba83cbb
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14702: DOMDocument::xinclude() crash
2024-06-28 22:29:03 +02:00
Niels Dossche
0a1f51deb3
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14702: DOMDocument::xinclude() crash
2024-06-28 22:22:12 +02:00
Niels Dossche
42908f9f68
Fix GH-14702: DOMDocument::xinclude() crash
The xinclude code from libxml removes the fallback node,
but the fallback node is still reference via $fallback.
The solution is to detach the nodes that are going to be removed in
advance.

Closes GH-14704.
2024-06-28 22:21:12 +02:00
Niels Dossche
2fc27b7d2a
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14590: Memory leak in FPM test gh13563-conf-bool-env.phpt
2024-06-28 22:10:23 +02:00
Niels Dossche
41371900a8
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14590: Memory leak in FPM test gh13563-conf-bool-env.phpt
2024-06-28 22:08:18 +02:00
Niels Dossche
056bec72f4
Fix GH-14590: Memory leak in FPM test gh13563-conf-bool-env.phpt
Values retrieved from zend_getenv should be freed.
Note: The only possible value for `zend_getenv` is `sapi_getenv` which uses
zend alloc to duplicate the string that it reads from the SAPI module.

Closes GH-14708.
2024-06-28 22:05:15 +02:00
David Carlier
532a2604c2
Fix GH-14698: segfault on dom node after dereference.
close GH-14701
2024-06-28 20:52:48 +01:00
Niels Dossche
03dab7ec3d
Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] Move incorrectly placed NEWS items to the right place
2024-06-28 20:16:51 +02:00
Niels Dossche
f97e2779b1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] Move incorrectly placed NEWS items to the right place
2024-06-28 20:16:45 +02:00
Niels Dossche
643762cd78
[ci skip] Move incorrectly placed NEWS items to the right place 2024-06-28 20:16:19 +02:00
Niels Dossche
d883996326
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14537: shmop Windows 11 crashes the process
2024-06-28 20:14:26 +02:00
Niels Dossche
c19affc567
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14537: shmop Windows 11 crashes the process
2024-06-28 20:14:20 +02:00
Niels Dossche
39a3266576
Fix GH-14537: shmop Windows 11 crashes the process
The error handling code isn't entirely right in two places.
One of the code blocks is dead because of an always-false condition, and
another code block is missing the assignment of a NULL pointer.

Getting the exact same behaviour is not entirely possible because you
can't extend the size of a shared memory region after it was made with
the Windows APIs we use, unless we destroy the region and recreate it,
but that has other consequences.
However, it certainly shouldn't crash.

Closes GH-14707.
2024-06-28 20:13:47 +02:00
Niels Dossche
59e639b5d4
Follow-up on GH-13516: include config.h from build dir for new files in ext-dom (#14705)
GH-13516 was created before the new DOM files were added, and the PR was
never rebased to include the new DOM files, so there are three places
which were not replaced.
2024-06-28 18:29:22 +02:00
Máté Kocsis
a2cecd2a6f
Remove ZEND_STATIC_ASSERT() calls from legacy arginfo files
After report in 5992a29724 (r143540472)
2024-06-27 21:52:27 +02:00
Peter Kokot
c705dd8884
Wrap FPM checks in AC_CACHE_CHECK and fix CS (#14681)
- This simplifies over-quoted arguments to AC_COMPILE_IFELSE
- Indentation and other CS fixes
- php_cv_* cache variables
- AC_DEFINE help texts syncs to make it more clear
- Fix -Wunused-but-set-variable warnings
2024-06-27 21:30:35 +02:00
Peter Kokot
fd28bb0f51
Normalize ext/standard sources (#14677)
Follow-up of GH-14654
2024-06-27 20:45:09 +02:00
Peter Kokot
11f4683ee5
Wrap __cpuid_count check into ZEND_CHECK_CPUID_COUNT M4 macro (#14692)
Instead of checking this when including the Zend.m4 file in configure.ac
check is executed with the ZEND_INIT macro.
2024-06-27 20:16:40 +02:00
Peter Kokot
c7c02f2abf
Wrap global register variables check in M4 macro (#14683)
This adds ZEND_CHECK_GLOBAL_REGISTER_VARIABLES M4 macro to properly
sort the --enable-gcc-global-regs in configure --help output, fixes
over-quoted arguments, syncs CS and updates help texts.
2024-06-27 20:08:03 +02:00
Tim Düsterhus
ac54d1c039
hash: Add simple HashContext::__debugInfo() implementation (#14644)
* hash: Add simply HashContext::__debugInfo() implementation

* NEWS/UPGRADING
2024-06-27 19:29:37 +02:00
Gina Peter Banyard
5b1b3ae673 ext/soap: Initialize a HashTable of size j
The i seems to be a mistake as everything else uses j
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
ee75f344f8 ext/soap: Add const qualifiers for serialize functions
As serializing something should not affect the value of it
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
ca2b131c6e ext/soap: mark string param of sdl_serialize_key() as const
Add const qualifiers to the variables at the call size
Rename variables when they were shadowing a variable from the outer scope
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
325f8f0cfc ext/soap: Remove cast from macro
Move it to the one call site that requires it
2024-06-27 17:41:23 +01:00
Gina Peter Banyard
0e91b4f5e6 ext/soap: convert int type to size_t where appropriate 2024-06-27 17:41:23 +01:00
Gina Peter Banyard
902c8ceab0 ext/soap: Rename MD5 context variable to not shadow the stream context variable 2024-06-27 17:41:23 +01:00
Gina Peter Banyard
26143dae2d ext/soap: Remove unused 'cache' extension global 2024-06-27 17:41:23 +01:00
Peter Kokot
3d6bd16239
Sync missing hash and pcre dependencies for opcache on Windows (#14682)
- ext/hash is required only on Windows
- ext/pcre is required
2024-06-27 18:23:01 +02:00
David CARLIER
54e5e7b507
ext/pdo_pgsql: object initialisation, using smart_str api instead. (#14679) 2024-06-27 05:53:38 +01:00
Peter Kokot
604dafff3a
Rename and refactor Zend.m4 macros (#14671)
- LIBZEND_* -> ZEND_*
- A single "public" initialization M4 macro ZEND_INIT that wraps Zend
  engine related configure step checks and initialization.
2024-06-26 22:57:01 +02:00
Peter Kokot
807273e263
Normalize Zend sources (#14676)
Follow-up of GH-14654
2024-06-26 22:18:46 +02:00
Niels Dossche
1501da0bf9 NEWS and UPGRADING for new DOM features RFC 2024-06-26 12:17:12 -07:00
Niels Dossche
48c9f1e2c3 Implement Dom\HTMLElement class 2024-06-26 12:17:12 -07:00
Niels Dossche
78401ba867 Implement Dom\Document::$title setter 2024-06-26 12:17:12 -07:00
Niels Dossche
04af960397 Implement Dom\Document::$title getter 2024-06-26 12:17:12 -07:00
Niels Dossche
a12db3b656 Implement Dom\Document::$body setter 2024-06-26 12:17:12 -07:00
Niels Dossche
287cf91724 Implement Dom\Document::$head 2024-06-26 12:17:12 -07:00
Niels Dossche
a1485df55a Implement Dom\Document::$body getter 2024-06-26 12:17:12 -07:00
Niels Dossche
e7cc819bd9
Merge branch 'PHP-8.3'
* PHP-8.3:
  Add SKIPIFs for upstream regression in libxslt (#14674)
2024-06-26 19:36:08 +02:00
Niels Dossche
4794c1fc16
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add SKIPIFs for upstream regression in libxslt (#14674)
2024-06-26 19:36:01 +02:00
Niels Dossche
5a32b510ef
Add SKIPIFs for upstream regression in libxslt (#14674)
See https://gitlab.gnome.org/GNOME/libxslt/-/issues/113
2024-06-26 19:35:52 +02:00
Niels Dossche
3760c9d001
Add SKIPIFs for upstream regression in libxslt (#14674)
See https://gitlab.gnome.org/GNOME/libxslt/-/issues/113
2024-06-26 19:31:21 +02:00
Peter Kokot
8946099b73
Rename AC_FPM_* M4 macros to PHP_FPM_* (#14670)
This syncs the FPM SAPI M4 macro names with the current naming
conventions prefixed with PHP_.
2024-06-26 15:39:52 +02:00
Derick Rethans
9b5c15ba98 Remove superfluous whitespace 2024-06-26 08:06:41 -05:00
Derick Rethans
df7d304b62 Emit opcode for frameless functions at line number where the function call starts 2024-06-26 08:06:41 -05:00
Arnaud Le Blanc
11accb5cdf
Preferably include from build dir (#13516)
* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :

    -I$(top_builddir)/main
    -I$(top_srcdir)
    -I$(top_builddir)/TSRM
    -I$(top_builddir)/Zend
    -I$(top_srcdir)/main
    -I$(top_srcdir)/Zend
    -I$(top_srcdir)/TSRM
    -I$(top_builddir)/

As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.

After this change, the include path is defined as follows:

    -I$(top_builddir)/main
    -I$(top_builddir)
    -I$(top_srcdir)/main
    -I$(top_srcdir)
    -I$(top_builddir)/TSRM
    -I$(top_builddir)/Zend
    -I$(top_srcdir)/Zend
    -I$(top_srcdir)/TSRM

* Fix extension include path for out of tree builds

* Include config.h with the brackets form

`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.

Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.
2024-06-26 00:26:43 +02:00