Commit graph

131149 commits

Author SHA1 Message Date
Patrick Allaert
6e8f5e091e
Merge branch 'PHP-8.1' into PHP-8.2 2023-08-15 21:10:06 +02:00
Patrick Allaert
6e3f93f2f8
PHP-8.1 is now for PHP 8.1.24-dev 2023-08-15 21:09:58 +02:00
George Peter Banyard
02a80c5b82 Fix various bugs related to DNF types
- GH-11958: DNF types in trait properties do not get bound properly
 - GH-11883: Memory leak in zend_type_release() for non-arena allocated DNF types
 - Internal trait bound to userland class would not be arena allocated
 - Property DNF types were not properly deep copied during lazy loading

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: ju1ius <jules.bernable@gmail.com>
2023-08-15 15:34:33 +01:00
Niels Dossche
0b516aea25 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix #81992: SplFixedArray::setSize() causes use-after-free
2023-08-14 21:34:04 +02:00
Niels Dossche
b71c6b2c6c Fix #81992: SplFixedArray::setSize() causes use-after-free
Upon resizing, the elements are destroyed from lower index to higher
index. When an element refers to an object with a destructor, it can
refer to a lower (i.e. already destroyed) element, causing a uaf.
Set refcounted zvals to NULL after destroying them to avoid a uaf.

Closes GH-11959.
2023-08-14 21:32:22 +02:00
Ilija Tovilo
231a1f81c6
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  ci update freebsd image to the 13.2 image (#11110)
2023-08-14 16:30:14 +02:00
David CARLIER
2012fd3f04
ci update freebsd image to the 13.2 image (#11110) 2023-08-14 16:30:01 +02:00
Ilija Tovilo
e11b55d219
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Use per-branch matrix for windows nightly
2023-08-14 11:40:56 +02:00
Ilija Tovilo
902d39d57c
Use per-branch matrix for windows nightly
I forgot this in the last PR.
2023-08-14 11:38:59 +02:00
Kamil Tekiela
7a4b213c1f
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix error checking in mysqlnd
2023-08-10 15:25:37 +01:00
Kamil Tekiela
0d922aa595
Fix error checking in mysqlnd
Closes GH-11925
2023-08-10 15:23:54 +01:00
Ilija Tovilo
241510c454
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Remove i386 Linux from push
2023-08-10 15:59:42 +02:00
Ilija Tovilo
248e6b0404
Remove i386 Linux from push
Testing this in nightly is sufficient. 32-bit problems are rare.

Closes GH-11922
2023-08-10 15:59:17 +02:00
Ilija Tovilo
b23423528f
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add Windows build to nightly
2023-08-10 15:56:20 +02:00
Ilija Tovilo
90f514cf21
Add Windows build to nightly
Also stop running 32-bit in push, it's really not necessary.
2023-08-10 15:56:08 +02:00
Ilija Tovilo
1aae59cf43
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix EXPECT for bug52820.phpt on newer curl versions
  Fix curl_basic_009.phpt for newer curl versions
2023-08-10 15:52:14 +02:00
Ilija Tovilo
0e843c5d82
Fix EXPECT for bug52820.phpt on newer curl versions
New curl versions have a "processing: url" line. The connection number in
"Closing connection" is apparently also dropped.
2023-08-10 15:51:53 +02:00
Ilija Tovilo
3af76b2302
Fix curl_basic_009.phpt for newer curl versions 2023-08-10 15:51:49 +02:00
Derick Rethans
57417bbc3f Merge remote-tracking branch 'derickr/issue11416-php82-unserialize' into PHP-8.2 2023-08-10 12:11:04 +01:00
Derick Rethans
b71d2e16e6 Fix GH-11416: Crash with DatePeriod when uninitialised objects are passed in (PHP 8.2+) 2023-08-09 16:10:14 +01:00
Derick Rethans
7f6e98cec7 Merge branch 'PHP-8.1' into PHP-8.2 2023-08-09 15:39:25 +01:00
Derick Rethans
4833b84854 Fix GH-11416: Crash with DatePeriod when uninitialised objects are passed in 2023-08-09 15:39:13 +01:00
Niels Dossche
8f1cbc8dea Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix segfault when DOMParentNode::prepend() is called when the child disappears
2023-08-08 20:07:11 +02:00
Niels Dossche
d19e4da125 Fix segfault when DOMParentNode::prepend() is called when the child disappears
Closes GH-11906.
2023-08-08 20:06:39 +02:00
George Peter Banyard
52bd07c186 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix skipif condition on new test
2023-08-08 12:42:53 +01:00
George Peter Banyard
4cbc66d5e6 Fix skipif condition on new test
I'm an idiot, messed up the condition when tweaking the test manually before committing.
2023-08-08 12:42:16 +01:00
George Peter Banyard
1ff59b9ad9 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix off-by-one bug when truncating tempnam prefix
2023-08-08 09:51:02 +01:00
Athos Ribeiro
cbfd73765a Fix off-by-one bug when truncating tempnam prefix
The tempnam documentation currently states that "Only the first 63
characters of the prefix are used, the rest are ignored". However when
the prefix is 64 characters-long, the current implementation fails to
strip the last character, diverging from the documented behavior. This
patch fixes the implementation so it matches the documented behavior for
that specific case where the prefix is 64 characters long.

Closes GH-11870

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-08-08 09:46:27 +01:00
Máté Kocsis
43e62aa21f
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix return type of odbc_data_source()
2023-08-08 08:54:41 +02:00
Máté Kocsis
77252afaf0
Fix return type of odbc_data_source() 2023-08-08 08:52:41 +02:00
Niels Dossche
4c5bf0c23b Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix viable next sibling search for replaceWith
2023-08-07 20:23:39 +02:00
Niels Dossche
df6e8bd4fd Fix viable next sibling search for replaceWith
Closes GH-11888.
2023-08-07 20:23:06 +02:00
Niels Dossche
87148f6de2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix viable next sibling search for replaceWith
2023-08-07 20:21:05 +02:00
Niels Dossche
815b5ad501 Fix viable next sibling search for replaceWith
Closes GH-11888.
2023-08-07 20:19:31 +02:00
David CARLIER
e9e5b4c1c8 Merge branch 'PHP-8.1' into PHP-8.2 2023-08-07 19:02:44 +01:00
Kévin Dunglas
96885bc04f fix: handle the GNU specific version of strerror_r
Close GH-11882
2023-08-07 19:01:24 +01:00
Niels Dossche
b80ded8303 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11830: ParentNode methods should perform their checks upfront
  Fix manually calling __construct() on DOM classes
2023-08-07 19:47:27 +02:00
Niels Dossche
dddd309da4 Fix GH-11830: ParentNode methods should perform their checks upfront
Closes GH-11887.
2023-08-07 19:39:05 +02:00
Niels Dossche
08c4db7f36 Fix manually calling __construct() on DOM classes
Closes GH-11894.
2023-08-07 19:37:47 +02:00
Ilija Tovilo
16c6d60067
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Don't test macOS & i386 without opcache on push
2023-08-07 12:26:45 +02:00
Ilija Tovilo
5cd0208e9f
Don't test macOS & i386 without opcache on push
It should be incredibly rare for something to fail only without opcache while
also being platform specific. We're keeping opcache-less tests for x64 Linux,
macOS and i386 will continue to be tested without opcache in nightly.

Closes GH-11867
2023-08-07 12:25:24 +02:00
Kamil Tekiela
4db701c049
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix MySQL Statement has a empty query result when the response field has changed, also Segmentation fault
2023-08-04 22:31:18 +01:00
Yurun
ca5d48213a
Fix MySQL Statement has a empty query result when the response field has changed, also Segmentation fault
Closes GH-11551.
2023-08-04 22:25:01 +01:00
Niels Dossche
00ab6bb078 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Mark buildFromIterator test as conflicting
2023-08-04 21:08:57 +02:00
Niels Dossche
dc586b121a Mark buildFromIterator test as conflicting
Commit 0b2e6bc2b0 started caching the directory entry type to improve
performance. Shortly after, we've seen flaky failures of the
buildFromIterator phar test.

When it fails, it's always a value error in the constructor of
RecursiveDirectoryIterator::__construct() with a "no such file or
directory" error. What's happening here is this:
1) A parallel test creates a subdirectory in the current working dir.
2) This test checks hasChildren() on a directory entry, the cached entry
   returns "yes" on the subdirectory.
3) The parallel test finishes and removes the subdirectory.
4) The constructor mentioned above is called, causing an exception
   because the directory is gone.

This race has always been possible, even before said commit. It's just
that it was very hard to hit before: the expensive stat call made the
race window hard to hit. The race is now easier to hit because of the
caching that is fast.

Since there's many tests that modify the current working directory, it
seems best to mark this as an "all" conflict. We cannot avoid every
TOC-TOU race when working with files with these phar tests.

In particular, mounteddir.phpt caused every conflict I saw on CI, but
there's more tests that create subdirectories in the current working
directory.

Closes GH-11869.
2023-08-04 21:08:39 +02:00
Niels Dossche
c59bfc8d98 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Revert the fix for GH-11498
2023-08-03 21:59:21 +02:00
Niels Dossche
f7be15dbad Revert the fix for GH-11498
People relied on manually waiting for children, but the fix for GH-11498
broke this. Fixing this in PHP is fundamentally incompatible with doing
the wait loop in userland. This reverts to the old behaviour.

Closes GH-11863.
2023-08-03 21:48:34 +02:00
Niels Dossche
77417f81cb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix missing link variable in test
2023-08-03 21:12:04 +02:00
Niels Dossche
162bd2a58a Fix missing link variable in test 2023-08-03 21:11:55 +02:00
Niels Dossche
75441d71d8 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10964: Improve `man` page about the built-in server
  Fix GH-11438: mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters
2023-08-03 20:32:30 +02:00