Commit graph

64769 commits

Author SHA1 Message Date
Niels Dossche
0ea268b51a Remove obsolete libxml2 code
LIBXML2_NEW_BUFFER is always defined since libxml2 2.9.0.
That's the minimum version PHP requires, so it will always be defined.
2023-09-09 21:58:13 +02:00
Niels Dossche
518233c39d Merge branch 'PHP-8.3'
* PHP-8.3:
  Use zend_get_gc_buffer_add_fcc()
2023-09-09 20:00:18 +02:00
Niels Dossche
49980ee89d Use zend_get_gc_buffer_add_fcc() 2023-09-09 20:00:01 +02:00
Niels Dossche
c7777e354d Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix build with sqlite3 gc and fci/fcc api
2023-09-09 16:07:17 +02:00
Niels Dossche
1d59b37742 Fix build with sqlite3 gc and fci/fcc api 2023-09-09 16:07:10 +02:00
Niels Dossche
c8e2765ba3 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-11878: SQLite3 callback functions cause a memory leak with a callable array
2023-09-09 15:35:11 +02:00
Niels Dossche
cb6fac5b8a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-11878: SQLite3 callback functions cause a memory leak with a callable array
2023-09-09 15:35:03 +02:00
Niels Dossche
6851c7b867 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11878: SQLite3 callback functions cause a memory leak with a callable array
2023-09-09 15:34:38 +02:00
Niels Dossche
07a9d2fb32 Fix GH-11878: SQLite3 callback functions cause a memory leak with a callable array
In this test file, the free_obj handler is called with a refcount of 2,
caused by the fact we do a GC_ADDREF() to increase its refcount while
its refcount is still 1 because the Foo object hasn't been destroyed yet
(due to the cycle caused by the sqlite function callback).
Solve this by introducing a get_gc handler.

Closes GH-11881.
2023-09-09 15:33:50 +02:00
Niels Dossche
880faa39e8
Add DOMNode::compareDocumentPosition() (#12146)
Reference: https://dom.spec.whatwg.org/#dom-node-comparedocumentposition
2023-09-09 01:14:26 +02:00
Niels Dossche
8c2c69494e Replace always-false attribute type check with assertion
The type will always be XML_ATTRIBUTE_NODE by construction via
php_dom_create_object, no need to check the type. Use an assertion
instead. This simplifies code and reasoning about error conditions.
2023-09-08 22:51:22 +02:00
Alex Dowad
50ca24251d PHP_HAVE_BUILTIN_USUB_OVERFLOW macro is defined even if __builtin_usub_overflow not available
...So conditionally including code which uses __builtin_usub_overflow
(for performance) if the macro is defined is not correct. We also need
to check if the macro is defined as a non-zero value.

Apparently this broke the build for a user whose C compiler is GCC
4.9.4. Sorry, user! That was my fault!

Thanks to Jakub Zelenka for reporting the issue.
2023-09-08 20:36:24 +02:00
Dmitry Stogov
be87cf9e62 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed tracing JIT support for CALLABLE_CONVERT (#12156)
2023-09-08 18:27:54 +03:00
Dmitry Stogov
94eb3bdcbf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed tracing JIT support for CALLABLE_CONVERT (#12156)
2023-09-08 18:27:44 +03:00
Dmitry Stogov
8fcffa666f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed tracing JIT support for CALLABLE_CONVERT (#12156)
2023-09-08 18:27:31 +03:00
Dmitry Stogov
be0245c756
Fixed tracing JIT support for CALLABLE_CONVERT (#12156) 2023-09-08 18:27:13 +03:00
Niels Dossche
d639a3755a Merge branch 'PHP-8.3'
* PHP-8.3:
  Update bundled pcre2 to 10.42
2023-09-08 17:15:56 +02:00
Niels Dossche
c4e8f652c5 Update bundled pcre2 to 10.42
Closes GH-12109.
2023-09-08 17:14:39 +02:00
Niels Dossche
ac62eee842
Remove DOM_NO_ARGS() and DOM_NOT_IMPLEMENTED() (#12147)
DOM_NO_ARGS() has no users.
DOM_NOT_IMPLEMENTED() has a single user.
2023-09-08 17:02:52 +02:00
George Peter Banyard
7723718502
ext/pdo: Refactor pdo_stmt_construct() to use newer FCI/FCC API (#12142) 2023-09-08 12:32:44 +01:00
Jakub Zelenka
e04ddb32c8
Merge branch 'PHP-8.3' 2023-09-08 11:00:14 +01:00
Jakub Zelenka
64ebadcac5
Fix GH-12151: str_getcsv ending with escape zero segfualt
Closes GH-12152
2023-09-08 10:58:55 +01:00
Ilija Tovilo
6fac4d0ff2
Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Skip leaking odbc test on asan
2023-09-08 11:08:27 +02:00
Ilija Tovilo
5ed58386d1
[skip ci] Skip leaking odbc test on asan 2023-09-08 11:05:34 +02:00
Ilija Tovilo
06c4092d05
Merge branch 'PHP-8.3'
* PHP-8.3:
  Revert "Skip profiling of sqlite3_step"
2023-09-07 10:35:33 +02:00
Ilija Tovilo
3fb09940fc
Revert "Skip profiling of sqlite3_step"
This reverts commit bb31a75321.

It doesn't seem like this actually fixed the problem.
2023-09-07 10:35:06 +02:00
George Peter Banyard
e72b6f471a Merge branch 'PHP-8.3'
* PHP-8.3:
  ODBC unit tests shouldn't override odbc.ini location
  Fix persistent procedural ODBC connections not getting closed
2023-09-06 01:58:30 +01:00
George Peter Banyard
e2667f17bc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ODBC unit tests shouldn't override odbc.ini location
  Fix persistent procedural ODBC connections not getting closed
2023-09-06 01:58:11 +01:00
George Peter Banyard
88ed678935 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  ODBC unit tests shouldn't override odbc.ini location
  Fix persistent procedural ODBC connections not getting closed
2023-09-06 01:57:28 +01:00
Calvin Buckley
a648d39297 ODBC unit tests shouldn't override odbc.ini location
`ext/odbc/tests/config.inc` overrides the INIs used for the ODBC driver
manager pointlessly. It's not pointing to some custom PHP test suite
specific one, but the system one in `/etc/odbc(inst).ini`. Which
doesn't necessarily exist, on i.e. NixOS, MacPorts, etc.

Closes GH-12133

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-09-06 01:56:04 +01:00
Calvin Buckley
5a2b251610 Fix persistent procedural ODBC connections not getting closed
Like oci8, procedural ODBC uses an apply function on the hash list to
enumerate persistent connections and close the specific one. However,
this function take zvals, not resources. However, it was getting casted
as such, causing it to interpret the pointer incorrectly. This could
have caused other issues, but mostly manifested as failing to close the
connection even fi it matched.

The function now takes a zval and gets the resource from that. In
addition, it also removes the cast of the function pointer and moves
casting to the function body, to avoid possible confusion like this in
refactors again. It also cleans up style and uses constants in the
function body.

Closes GH-12132

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-09-06 01:55:02 +01:00
Dmitry Stogov
c69ec5402d Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix ws
2023-09-06 00:01:23 +03:00
Dmitry Stogov
3ffa1c4c3e Fix ws 2023-09-06 00:01:03 +03:00
Dmitry Stogov
ce80c7a73a Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed tracing jit for BIND_INIT_STATIC_OR_JMP
2023-09-05 23:58:23 +03:00
Dmitry Stogov
95edb50b58 Fixed tracing jit for BIND_INIT_STATIC_OR_JMP 2023-09-05 23:57:38 +03:00
Ilija Tovilo
fc1c948208
Merge branch 'PHP-8.3'
* PHP-8.3:
  Skip profiling of sqlite3_step
2023-09-05 17:38:25 +02:00
Ilija Tovilo
bb31a75321
Skip profiling of sqlite3_step
It looks like sqlite3_step can vary quite drastically from one request to the
next. This seems to be caused by more or fewer calls to sqlite3VdbeSorterWrite.
It would be great if we could find a way to make execution of this function more
consistent, but at this point I don't know how.

Closes GH-12130
2023-09-05 17:38:00 +02:00
Ilija Tovilo
fd13aeec95
Merge branch 'PHP-8.3'
* PHP-8.3:
  Revert 479e659331
2023-09-05 16:14:59 +02:00
Ilija Tovilo
3433dab5f7
Revert 479e659331
There were 4 different reports of this breaking behavior. This is higher than I
expected. This bug fix may still be desirable, but should be discussed on the
list beforehand.

Closes GH-12127
2023-09-05 16:14:28 +02:00
George Peter Banyard
ee6453f737 Merge branch 'PHP-8.3'
* PHP-8.3:
  Prevents double call to internal iterator rewind handler
  adds failing test case for #12060
2023-09-05 10:37:00 +01:00
George Peter Banyard
d7273c5963 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Prevents double call to internal iterator rewind handler
  adds failing test case for #12060
2023-09-05 10:36:16 +01:00
George Peter Banyard
c672a06954 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Prevents double call to internal iterator rewind handler
  adds failing test case for #12060
2023-09-05 10:27:33 +01:00
ju1ius
9658d9ada4 adds failing test case for #12060
Signed-off-by: George Peter Banyard <girgias@php.net>
2023-09-05 10:23:22 +01:00
Ilija Tovilo
c0b3cbfdfc
Merge branch 'PHP-8.3'
* PHP-8.3:
  xfail mbstring test on Windows 32-bit
2023-09-03 14:23:09 +02:00
Ilija Tovilo
6b74f1f745
xfail mbstring test on Windows 32-bit 2023-09-03 14:22:40 +02:00
George Peter Banyard
4a7aa64f1e Merge branch 'PHP-8.3'
* PHP-8.3:
  Fixed bug GH-12020: intl_get_error_message() broken after MessageFormatter::formatMessage() fails
2023-09-03 01:06:15 +01:00
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
Niels Dossche
48443183af
Use zend_result as return for properties in ext/dom (#12113) 2023-09-03 00:42:49 +02:00