1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Commit Graph

132975 Commits

Author SHA1 Message Date
Ilija Tovilo ee000ea186 Fix uouv on oom on object allocation
We may OOM during object initialization. In this case, free_obj needs to guard
against NULL values. There may be more cases where this is an issue, these were
the ones I was able to discover via script.

Fixes GH-11734
2023-08-14 11:10:00 +02:00
Cristian Rodríguez 2196e2299f Use zend_ast_size consistenly (#11955)
* opcache: use zend_ast_size helper in zend_persist_ast

* opcache: use zend_ast_size helper in zend_persist_ast_calc

* Zend: fix zend_ast_size definition

It is better not to use sizeof(struct_with_flexible_array)
and instead rely on offsetof(type, member) like most
other similar wrappers do.
2023-08-14 00:51:14 +02:00
Jorg Adam Sowa e56ed6e1ab BCmath extension code reformatting (#11896)
Re-formats the BCmath extension to have consistent formatting.

Mostly, it adds the spaces in calculations to have them more readable.

Also:

   -  removes unused headers
   -  removes few variables which are used only once in the code

Co-authored-by: George Peter Banyard <girgias@php.net>
2023-08-13 16:17:36 +01:00
Niels Dossche bb092ab4c6 Fix #80927: Removing documentElement after creating attribute node: possible use-after-free
Closes GH-11892.
2023-08-12 18:49:12 +02:00
Kamil Tekiela f907a009f9 Align highlight_string|file with HTML standard and modern browsers
Closes GH-11913
2023-08-12 15:08:28 +01:00
Kamil Tekiela 4a77a1ec08 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix error checking in mysqlnd
2023-08-10 15:26:14 +01: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 fad4ea1790 Merge branch 'PHP-8.2'
* PHP-8.2:
  Remove i386 Linux from push
2023-08-10 16:00:12 +02: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 fa8b4e15bd Merge branch 'PHP-8.2'
* PHP-8.2:
  Add Windows build to nightly
2023-08-10 15:57: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 2b2d2b04e7 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix EXPECT for bug52820.phpt on newer curl versions
  Fix curl_basic_009.phpt for newer curl versions
2023-08-10 15:52:21 +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 1bddd4ef44 Merge branch 'PHP-8.2' 2023-08-10 12:11:35 +01:00
Derick Rethans 57417bbc3f Merge remote-tracking branch 'derickr/issue11416-php82-unserialize' into PHP-8.2 2023-08-10 12:11:04 +01:00
Kamil Tekiela 788540ef2c Remove remnant of COM_FIELD_LIST 2023-08-10 00:38:37 +01:00
Niels Dossche 620b6220c2 Optimize checks for DOMParentNode and DOMChildNode
Because we check the list with dom_sanity_check_node_list_for_insertion()
before dom_is_node_in_list(), then we don't have to check the object
type anymore in dom_is_node_in_list(), because
dom_sanity_check_node_list_for_insertion() will have already done that.

Closes GH-11914.
2023-08-09 21:31:40 +02:00
Niels Dossche 23ba4cde53 Align DOMChildNode parent checks with spec
Closes GH-11905.
2023-08-09 21:24:33 +02:00
Derick Rethans e157da11f3 Update initialisation check for new PHP-8.3 API 2023-08-09 20:12:41 +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 f8b42da3a4 Merge branch 'PHP-8.2' 2023-08-09 15:39:31 +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
Ilija Tovilo fc9266a5fc Move ASAN built to GitHub actions
Cirrus will no longer offer unlimited free builds starting next month. We don't
have an alternative for FreeBSD and ARM, so move what we can for now.

Closes GH-11898
2023-08-09 14:06:36 +02:00
Ilija Tovilo db4dba6702 Move opnum_start for goto for clarification (#11911)
opnum_start denotes the start of the ZEND_FREE block of skipped consuming
opcodes. Storing the number before zend_compile_expr(..., label_ast) makes it
seem like it denotes the start of the label block. However, label_ast must only
be a zval string AST, and as such never results in an actual opcode.
2023-08-09 11:38:54 +02:00
Niels Dossche cb927e0fc0 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix segfault when DOMParentNode::prepend() is called when the child disappears
2023-08-08 20:09:08 +02: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
Máté Kocsis 038b2ae254 Make the $enable parameter of odbc_autocommit() nullable (#11909)
Co-authored-by: George Peter Banyard <girgias@php.net>
2023-08-08 15:31:58 +02:00
George Peter Banyard ad18fbc836 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix skipif condition on new test
2023-08-08 12:43:16 +01: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 c9c846d63e Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix off-by-one bug when truncating tempnam prefix
2023-08-08 09:52:18 +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
Alexandre Daubois 417f3fdb91 Improve ext/pdo_sqlite tests cleanup (#11900) 2023-08-08 09:49: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 b275e13af7 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix return type of odbc_data_source()
2023-08-08 08:55:36 +02: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
Peter Kokot ba35ff0893 Remove unused HAVE_GCC_GLOBAL_REGS shell variable (#11877) 2023-08-08 00:51:56 +02:00
Niels Dossche 505fab1b84 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix viable next sibling search for replaceWith
2023-08-07 20:23:50 +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 5d5e6b0675 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix viable next sibling search for replaceWith
2023-08-07 20:22:36 +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