Commit Graph

133129 Commits

Author SHA1 Message Date
George Peter Banyard
b17958e7be Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed bug GH-12020: intl_get_error_message() broken after MessageFormatter::formatMessage() fails
2023-09-03 01:04:59 +01:00
George Peter Banyard
fa0953f49d Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed bug GH-12020: intl_get_error_message() broken after MessageFormatter::formatMessage() fails
2023-09-03 01:04:06 +01:00
George Peter Banyard
a579fa807c Fixed bug GH-12020: intl_get_error_message() broken after MessageFormatter::formatMessage() fails
Passing NULL as the pointer to intl_error* will use the global error stack.
This is what we need to do instead of pushing it onto the temporary format object that is released.
2023-09-03 01:02:46 +01:00
George Peter Banyard
013bb5769b Add tests for oss-fuzz-61469: Undef dynamic property in ++/-- unset in error handler
This was fixed as a consequence of a3a3964497

Closes GH-12011
2023-09-02 23:34:20 +01:00
George Peter Banyard
508e70ac3c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leak with failed SQLPrepare
2023-09-02 23:03:04 +01:00
George Peter Banyard
30b550bad5 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix memory leak with failed SQLPrepare
2023-09-02 23:01:08 +01:00
Calvin Buckley
a022ec53bd Fix memory leak with failed SQLPrepare
Closes GH-12095

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-09-02 23:00:06 +01:00
Máté Kocsis
c5fb8b6a6b
Align class name detection to the new class synopsis format 2023-09-01 14:15:36 +02:00
Ilija Tovilo
7c4bae688b
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix borked xleak skip on <PHP-8.3
2023-09-01 12:40:46 +02:00
Ilija Tovilo
aff86d68f6
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Fix borked xleak skip on <PHP-8.3
2023-09-01 12:40:07 +02:00
Ilija Tovilo
b21df69848
[skip ci] Fix borked xleak skip on <PHP-8.3
xleak in skipif was only added in PHP 8.3.
2023-09-01 12:39:03 +02:00
Remi Collet
1f2cfd8009
ensure displays_errors is off (default) 2023-08-31 14:55:17 +02:00
Ilija Tovilo
8f4738f41d
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Increase run-tests.php timeout for asan
2023-08-30 23:10:24 +02:00
Ilija Tovilo
936538d8d7
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Increase run-tests.php timeout for asan
2023-08-30 23:10:10 +02:00
Ilija Tovilo
f4a6a6d096
Increase run-tests.php timeout for asan
Closes GH-12087
2023-08-30 23:09:33 +02:00
Niels Dossche
c272cd6302 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18
2023-08-30 22:31:21 +02:00
Niels Dossche
f134b0efe6 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18
2023-08-30 22:31:11 +02:00
Niels Dossche
1cdcbc05b0 Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18
When you do an assignment between two zvals (no, not zval*), you copy
all fields. This includes the additional u2 data. So that means for
example the Z_NEXT index gets copied, which in some cases can therefore
cause a cycle in zend_hash lookups.
Instead of doing an assignment, we should be doing a ZVAL_COPY (or
ZVAL_COPY_VALUE for non-refcounting cases). This avoids copying u2.

Closes GH-12086.
2023-08-30 22:30:59 +02:00
Niels Dossche
dc72ceda90 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18
2023-08-30 22:27:06 +02:00
Niels Dossche
262a22740c Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18
2023-08-30 22:26:36 +02:00
Ilija Tovilo
64ef06d276
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Skip dl() tests on ASAN
2023-08-30 22:25:32 +02:00
Ilija Tovilo
10c81039da
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Skip dl() tests on ASAN
2023-08-30 22:25:11 +02:00
George Peter Banyard
9b28e521d1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-11876: ini_parse_quantity() accepts invalid quantities
2023-08-30 21:23:10 +01:00
George Peter Banyard
d229a480ad Fix GH-11876: ini_parse_quantity() accepts invalid quantities
Closes GH-11910
2023-08-30 21:22:13 +01:00
Ilija Tovilo
fb0f4215de
Skip dl() tests on ASAN 2023-08-30 22:20:51 +02:00
Niels Dossche
ffd7018fcd Fix GH-11972: RecursiveCallbackFilterIterator regression in 8.1.18
When you do an assignment between two zvals (no, not zval*), you copy
all fields. This includes the additional u2 data. So that means for
example the Z_NEXT index gets copied, which in some cases can therefore
cause a cycle in zend_hash lookups.
Instead of doing an assignment, we should be doing a ZVAL_COPY (or
ZVAL_COPY_VALUE for non-refcounting cases). This avoids copying u2.

Closes GH-12086.
2023-08-30 22:18:33 +02:00
Jakub Zelenka
fe30c5098f
Fix GH-12077: Check lsof functionality in socket on close test
Closes GH-12084
2023-08-30 14:28:17 +01:00
Filip Zrůst
02b3fb1f6b
Remove CPP when invoking dtrace utility
We are experiencing an issue when building PHP with DTrace enabled with
SystemTap (see GH-11847).† The issue is caused by inappropriate use C
preprocessor detected by GNU Autoconf in our “configure” script. C
preprocessor configuration found by AC_PROG_CPP macro is portable only
to run on files with “.c” extension.‡ However, statically-defined tracing
is described by D programs with “.d” extension which causes the issue.
We experience this even on typical Linux distribution with GNU Compiler
Collection (GCC) unless we override the defaults detected by our
“configure” script.

Many major Linux distributions use SystemTap to provide “dtrace”
utility. It relies on both external C preprocessor and external C
compiler. C preprocessor can be customized via CPP environment variable.
Similarly, C compiler can be customized via CC environment variable. It
also allows customization of C compiler flags via CFLAGS environment
variable. We have recently aligned both CPP and CC environment variable
with C preprocessor and C compiler we use to build regular C source code
as provided by our “configure” script (see GH-11643).* We wanted to
allow cross-compilation on Linux for which this was the only blocker. C
compiler flags from CFLAGS_CLEAN macro have already been in place since
versions 5.4.20 and 5.5.4 from 2013-09-18.

We had modified all “dtrace” invocations in the same way to make it look
consistent. However, only the C compiler (CC environment variable) is
necessary to for cross-compilation. There have never been any reported
issue with the C preprocessor. We acknowledge it would be great to allow
C preprocessor customization as well. However, the implementation would
require a lot of effort to do correctly given the limitations of
AC_PROG_CPP macro from GNU Autoconf. This would be further complicated
by the fact that all DTrace implementations, not just SystemTap, allow C
preprocessor customization but Oracle DTrace, Open DTrace, and their
forks do it differently. Nevertheless, they all default to “cpp” utility
and they all have or had been working fine. Therefore, we believe simply
removing CPP stabilizes “dtrace” invocation on Linux systems with
SystemTap and aligns it with other system configurations on other
platforms, until someone comes with complete solution with custom “m4”
and “make” macros, while our build system on Linux with SystemTap
supports cross-compilation.

Fixes GH-11847
Closes GH-12083

† https://github.com/php/php-src/issues/11847https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.71/autoconf.html#index-AC_005fPROG_005fCPP-1
* https://github.com/php/php-src/issues/11643
2023-08-30 13:40:21 +01:00
Jakub Zelenka
ea87501aee
Fix FPM UDS test for very long name check by extending its length
It did not correctly produce error message if run in in a short src path
2023-08-30 12:57:15 +01:00
Máté Kocsis
597aeb1246
Fix the class synopsis of Throwable
"ooexception" is rendered as a class, therefore interfaces should be marked up as "oointerface".
2023-08-30 08:24:45 +02:00
Jakub Zelenka
300ad65c7c
Extend workflow matrix and nighly with PHP-8.3 2023-08-29 18:26:25 +01:00
Jakub Zelenka
1371ce9539
Update NEWS for start of RC2 2023-08-29 17:14:11 +01:00
Jakub Zelenka
2eb21b0b1e
Update API versions and numbers 2023-08-29 17:04:24 +01:00
Niels Dossche
0b9702c9ed Implement GH-11934: Allow to pass CData into struct and/or union fields
Co-authored-by: KapitanOczywisty <44417092+KapitanOczywisty@users.noreply.github.com>

Closes GH-11935.
2023-08-29 17:01:10 +02:00
Ilija Tovilo
223fb08819
[skip ci] Fix coverage job in nightly
We get the following errors:

profiling:./ext/pdo_oci/.libs/oci_statement.gcda:Cannot open
...

It seems these extensions were never tested for coverage. Having coverage here
would be nice, but since they are not actively worked on I don't want to
investigate the issue.
2023-08-29 14:16:29 +02:00
Ilija Tovilo
b20ff2f9f5
Merge branch 'PHP-8.2'
* PHP-8.2:
  Make unrepeatable tests retriable
2023-08-29 13:59:26 +02:00
Ilija Tovilo
d5f7ffb914
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Make unrepeatable tests retriable
2023-08-29 13:58:53 +02:00
Ilija Tovilo
f2c16b7ba3
Make unrepeatable tests retriable
This was an error in thinking on my side. The reason these tests are
unrepeatable is because --repeat executes the same request in the same process,
and does not run the CLEAN section in between runs. This is not the case when
retrying tests.

We could potentially make CLEAN tests repeatable by including the CLEAN section
in the tested script. This does however not work for all tests (e.g. tests that
set open_basedir).

Closes GH-12072
2023-08-29 13:56:13 +02:00
Ilija Tovilo
d1a38e8b8e
Fix variable resource ids in odbc test
Ids may vary when using persistent resources. We're not actually interested in
the exact ids anyway.
2023-08-29 12:05:24 +02:00
Máté Kocsis
2f9f2928ce
Improve test for odbc_columns()
Hopefully, intermittent test failures will be fixed by creating and using a separate database.

Furthermore, more meaningful test cases are added which also assert the output, as well as wildcard character based searching.
2023-08-29 00:26:25 +02:00
Máté Kocsis
9dcdfa5e3f
Use correct format specifier 2023-08-29 00:26:24 +02:00
Jakub Zelenka
4e7ab1478d Small tyding up of filestat code 2023-08-28 22:22:54 +01:00
Jakub Zelenka
31833e6c4c
Expand file path in file stat only for wrapper path (#12068) 2023-08-28 22:14:32 +01:00
Niels Dossche
1754794fc3 [ci skip] Fix typos in UPGRADING 2023-08-28 23:00:05 +02:00
Niels Dossche
a3a3964497 Fix oss-fuzz #61712: assertion failure with error handler during binary op
Because the error handler is invoked after the property is updated,
the error handler has the opportunity to remove it before the property
is returned.

Switching the order around fixes this issue. The comments mention that
the current ordering prevents overwriting the EG(std_property_info)
field in the error handler. EG(std_property_info) no longer exists as it
was removed in 7471c217. Back then a global was used to store the
returned property info, but as this is no longer the case there is no
longer a need to protect against overwriting a global.

Closes GH-12062.
2023-08-28 20:00:49 +02:00
Peter Kokot
1413787884 Merge branch 'PHP-8.2'
* PHP-8.2:
  On riscv64 require libatomic if actually needed
2023-08-28 19:48:49 +02:00
Peter Kokot
a1043fe051 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  On riscv64 require libatomic if actually needed
2023-08-28 19:47:44 +02:00
Jeremie Courreges-Anglas
bf3fb4e5c9 On riscv64 require libatomic if actually needed
clang and newer gcc releases support byte-sized atomic accesses on
riscv64 through inline builtins.  In both cases the hard dependency on
libatomic added by GH-11321 isn't useful.

Stop using AC_CHECK_LIB() which is too naive to notice that libatomic
isn't needed.  Instead, PHP_CHECK_FUNC() will retry the check with -latomic
if required.

Closes GH-11790
2023-08-28 19:47:19 +02:00
Jakub Zelenka
766cac072f
Fix bug #76857: Can read "non-existant" files
This change makes checked and opened file consistent in a way that it is
using real path for stat operation in the same way like it is used for
open.

Closes GH-12067
2023-08-28 16:53:28 +01:00
Ilija Tovilo
4e963bc99f
Merge branch 'PHP-8.2'
* PHP-8.2:
  [skip ci] Fix trailing data in unserialize in soap test
2023-08-28 17:25:15 +02:00