Gina Peter Banyard
16872310d5
ext/spl: Deprecate SplObjectStorage::contains(), SplObjectStorage::attach(), and SplObjectStorage::detach() ( #19424 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_splobjectstoragecontains_splobjectstorageattach_and_splobjectstoragedetach
2025-08-09 11:36:14 +01:00
Gina Peter Banyard
8c5c03e33a
ext/spl: Deprecate passing spl_autoload_call() to spl_autoload_unregister() ( #19422 )
...
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_passing_spl_autoload_call_to_spl_autoload_unregister
2025-08-09 11:23:14 +01:00
Gina Peter Banyard
1e0c8baf05
tree: drop non canonical casts and ZPP tests
2025-08-06 13:20:28 +01:00
Niels Dossche
5cacae8f29
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-19094: Attaching class with no Iterator implementation to MultipleIterator causes crash
2025-07-11 12:28:47 +02:00
Niels Dossche
76b6b60b8c
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-19094: Attaching class with no Iterator implementation to MultipleIterator causes crash
2025-07-11 12:28:25 +02:00
Niels Dossche
71472268c0
Fix GH-19094: Attaching class with no Iterator implementation to MultipleIterator causes crash
...
Closes GH-19097.
2025-07-11 12:27:41 +02:00
Gina Peter Banyard
50ddf6a68f
ext/spl: Refactor ArrayObject sort methods
2025-07-03 21:50:45 +01:00
Gina Peter Banyard
faef004250
ext/spl: Add tests for disabled sort functions
2025-07-03 21:50:45 +01:00
Gina Peter Banyard
0ab5f70b3c
ext/spl: Remove bool type coercions in tests
2025-06-21 22:18:52 +02:00
Niels Dossche
e3433fdaef
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-18421: Integer overflow with large numbers in LimitIterator
2025-04-25 20:06:24 +02:00
Niels Dossche
4ff41cfb4b
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-18421: Integer overflow with large numbers in LimitIterator
2025-04-25 20:06:18 +02:00
Niels Dossche
a91d913901
Fix GH-18421: Integer overflow with large numbers in LimitIterator
...
Since we already know that `pos < intern->u.limit.offset` at this point,
we can reverse the expression.
Closes GH-18424.
2025-04-25 20:05:55 +02:00
Niels Dossche
89e5f6ca53
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-18322: SplObjectStorage debug handler mismanages memory
2025-04-14 14:11:40 +02:00
Niels Dossche
fc63a98f17
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-18322: SplObjectStorage debug handler mismanages memory
2025-04-14 14:11:35 +02:00
Niels Dossche
67503870ca
Fix GH-18322: SplObjectStorage debug handler mismanages memory
...
This hack was once necessary before there was a proper get_gc handler,
but now it breaks the engine constraints.
Closes GH-18323.
2025-04-14 14:11:09 +02:00
Niels Dossche
1684c52a88
Fix GlobIterator without constructor breaks count() ( #18314 )
...
As reported by OpenAI AARDVARK.
2025-04-12 09:59:56 +02:00
Niels Dossche
3ba725a556
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-18309: ipv6 filter integer overflow
Fix GH-18304: Changing the properties of a DateInterval through dynamic properties triggers a SegFault
2025-04-11 23:36:42 +02:00
Niels Dossche
a019fbd970
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-18309: ipv6 filter integer overflow
Fix GH-18304: Changing the properties of a DateInterval through dynamic properties triggers a SegFault
2025-04-11 23:36:12 +02:00
Niels Dossche
ba0853888d
Fix GH-18304: Changing the properties of a DateInterval through dynamic properties triggers a SegFault
...
For dynamic fetches the cache_slot will be NULL, so we have to check for
that when resetting the cache. For zip and xmlreader this couldn't
easily be tested because of a lack of writable properties.
Closes GH-18307.
2025-04-11 23:33:58 +02:00
Gina Peter Banyard
fec4f7f389
ext/standard/file: clarify fclose() warning
2025-03-24 22:54:34 +00:00
Niels Dossche
fc047b4e00
Merge branch 'PHP-8.4'
...
* PHP-8.4:
[ci skip] Fix NEWS order
Fix GH-18018: RC1 data returned from offsetGet causes UAF in ArrayObject
2025-03-13 19:11:59 +01:00
Niels Dossche
d43d4684bd
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-18018: RC1 data returned from offsetGet causes UAF in ArrayObject
2025-03-13 19:11:24 +01:00
Niels Dossche
27affd8da1
Fix GH-18018: RC1 data returned from offsetGet causes UAF in ArrayObject
...
We should first check truthiness and only after that destroy the value.
Closes GH-18034.
2025-03-13 19:10:34 +01:00
David Carlier
27125b8c39
Merge branch 'PHP-8.4'
2025-01-19 18:01:52 +00:00
David Carlier
c82e31b026
Fix GH-17516: SplFileTempObject::getPathInfo() crash on invalid class.
...
This no longer caught the case where an non SplFileInfo/inherited class
of nwas passed since the refactoring in 8.4.
close GH-17517
2025-01-19 18:01:02 +00:00
David Carlier
a4e25839d3
Merge branch 'PHP-8.4'
2025-01-14 18:33:00 +00:00
David Carlier
b1e0176455
Merge branch 'PHP-8.3' into PHP-8.4
2025-01-14 18:32:51 +00:00
David Carlier
e4473abefc
Fix GH-17463: SplTempFileObject::ftruncate() segfault on negative length.
...
close GH-465
2025-01-14 18:32:01 +00:00
Niels Dossche
8c443016e9
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-17307: Internal closure causes JIT failure
Generate inline frameless icall handlers only if the optimization level is set to inline
Fix GH-15981: Segfault with frameless jumps and minimal JIT
Fix GH-15833: Segmentation fault (access null pointer) in ext/spl/spl_array.c
2025-01-09 20:01:16 +01:00
Niels Dossche
b666dc9788
Fix GH-15833: Segmentation fault (access null pointer) in ext/spl/spl_array.c
...
We're accessing the object properties table directly in spl, but we're
not accounting for lazy objects. Upon accessing we should trigger the
initialization as spl is doing direct manipulations on the object
property table and expects a real object.
Closes GH-17235.
2025-01-09 19:58:00 +01:00
Gina Peter Banyard
3de22a84e8
ext/spl: Add trampoline test for iterator_apply()
2025-01-05 12:27:28 +00:00
Niels Dossche
8d39261603
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-17225: NULL deref in spl_directory.c
2024-12-21 12:48:24 +01:00
Niels Dossche
a02648087a
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-17225: NULL deref in spl_directory.c
2024-12-21 12:47:48 +01:00
Niels Dossche
4bfe69bbc4
Fix GH-17225: NULL deref in spl_directory.c
...
NULL checks for the glob stream are inconsistently applied. To solve
this generally, factor it out to a helper function so it's less likely
to be forgotten in the future.
Closes GH-17231.
2024-12-21 12:46:05 +01:00
Niels Dossche
4d140f79e6
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-17198: SplFixedArray assertion failure with get_object_vars
2024-12-17 23:22:47 +01:00
Niels Dossche
5f13c62c77
Fix GH-17198: SplFixedArray assertion failure with get_object_vars
...
Because the properties table contains both a numeric index and a string
index that map to 0 in a symbol table, this causes an assertion failure.
Looking at the manual page of get_object_vars(), it seems that only real
properties must be included. Given that SplFixedArray's elements are not
accessible like properties, they should be excluded. This restores PHP
8.3 behaviour. The reason that this didn't cause problems on 8.3 is
because it used a different handler (get_properties).
Closes GH-17206.
2024-12-17 23:22:33 +01:00
Dmitry Stogov
c630801ae7
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-15709: Crashing tests on Windows x64 (#17095 )
2024-12-13 02:06:14 +03:00
Dmitry Stogov
ccc6c0f78c
Fix GH-15709: Crashing tests on Windows x64 ( #17095 )
...
This is a quick fix for the problem.
It'll work while all the JIT-ed functions have the same "fixed stack frame".
Unwinder uses hard-coded unwind data for this "fixed stack frame".
* Preallocate space for Win64 shadow args
* typo
* Setup unwinder for JIT functions
* Revert "Dynamically xfail test case which fails on CI"
This reverts commit 7cc327fd5a .
* Revert "Dynamically xfail test case which fails on CI"
This reverts commit bdde797159 .
* Revert "Dynamically xfail test cases which fail on CI (GH-15710)"
This reverts commit 6d5962074f .
* Remove XFAIL sections
* Add hard-coded SEH unwind data for EXITCALL
* Fix unwind data
* Fix Windows multi-process support
* Typo
2024-12-13 02:05:45 +03:00
Ilija Tovilo
0ce151b8fe
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Add NEWS entry
Also fix same issue in ArrayObject::exchangeArray()
Fix use-after-free in ArrayObject::unset() with destructor
2024-11-04 17:50:37 +01:00
Ilija Tovilo
66ad4ce699
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Add NEWS entry
Also fix same issue in ArrayObject::exchangeArray()
Fix use-after-free in ArrayObject::unset() with destructor
2024-11-04 17:49:08 +01:00
Ilija Tovilo
dca438e6a3
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Add NEWS entry
Also fix same issue in ArrayObject::exchangeArray()
Fix use-after-free in ArrayObject::unset() with destructor
2024-11-04 17:47:49 +01:00
Ilija Tovilo
f7222bd2de
Also fix same issue in ArrayObject::exchangeArray()
2024-11-04 17:46:17 +01:00
Ilija Tovilo
8910ac800d
Fix use-after-free in ArrayObject::unset() with destructor
...
Fixes GH-16646
Closes GH-16653
2024-11-04 17:45:56 +01:00
Niels Dossche
2b17168ac1
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-16604: Memory leaks in SPL constructors
2024-11-01 20:43:49 +01:00
Niels Dossche
7a78ffcbb2
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-16604: Memory leaks in SPL constructors
2024-11-01 20:43:43 +01:00
Niels Dossche
eaa2b61acb
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-16604: Memory leaks in SPL constructors
2024-11-01 20:43:28 +01:00
Niels Dossche
886a5287ca
Fix GH-16604: Memory leaks in SPL constructors
...
Closes GH-16673.
2024-11-01 20:42:28 +01:00
David Carlier
cb6212b073
Merge branch 'PHP-8.4'
2024-10-28 21:25:49 +00:00
David Carlier
6a0035b7f4
Merge branch 'PHP-8.3' into PHP-8.4
2024-10-28 21:25:39 +00:00
David Carlier
e039afffaf
Merge branch 'PHP-8.2' into PHP-8.3
2024-10-28 21:22:17 +00:00