Commit Graph

135425 Commits

Author SHA1 Message Date
Jakub Zelenka
dbe35f6d2a
Merge branch 'PHP-8.3' 2024-03-30 14:38:41 +00:00
Jakub Zelenka
1b585d2620
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-30 14:38:19 +00:00
Jakub Zelenka
9b1d2e93b8
Fix FPM tester default env vars change
This broke cloexec test
2024-03-30 14:37:54 +00:00
Juan Morales
186465b1dd
QA - finfo_open - increase test coverage (#13839) 2024-03-30 15:16:06 +01:00
Jakub Zelenka
4d7e3fcb86
Merge branch 'PHP-8.3' 2024-03-29 19:40:03 +00:00
Jakub Zelenka
9cf0f30193
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-29 19:39:15 +00:00
Jakub Zelenka
11caf094f1
Fix GH-13620: Failing openssl_private_decrypt tests
Use OPENSSL_PKCS1_OAEP_PADDING padding in tests

Closes GH-13667
2024-03-29 19:33:37 +00:00
Peter Kokot
6c2d5e5f1c
Fix linking library for POSIX shared memory functions (#13822)
The POSIX shared memory object operations functions (shm_open,
shm_unlink...) are in:
* C library on most systems (newer Linux, Solaris 11.4, illumos, BSD*,
  macOS, Haiku, etc.)
* real-time (rt) library on older Linux distributions and Solaris <= 10.

Haiku C library (called root library) on Haiku is linked in by default.

Previous check always added additional rt or root library to global LIBS
and rt to OPCACHE_SHARED_LIBADD. Now, the library containing shm_open is
linked as needed to the always shared opcache extension.

This also removes unused HAVE_SHM_OPEN and HAVE_LIBROOT symbols.
2024-03-29 20:16:09 +01:00
Niels Dossche
f2b2b7f257 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13827: Null pointer access of type 'zval' in phpdbg_frame
2024-03-29 17:55:52 +01:00
Niels Dossche
508ed9b474 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13827: Null pointer access of type 'zval' in phpdbg_frame
2024-03-29 17:55:33 +01:00
Niels Dossche
d3f1f3ab40 Fix GH-13827: Null pointer access of type 'zval' in phpdbg_frame
We don't always have the line and filename in a backtrace frame, but
phpdbg assumes we do.

Closes GH-13831.
2024-03-29 17:54:23 +01:00
Jakub Zelenka
09f5e7921e
Merge branch 'PHP-8.3' 2024-03-29 16:33:44 +00:00
Jakub Zelenka
5231e71bfd
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-29 16:33:26 +00:00
Jakub Zelenka
100258ffd6
Fix test for GH-10495: feof on OpenSSL stream hangs 2024-03-29 16:32:23 +00:00
Jakub Zelenka
af41d58d6f
Merge branch 'PHP-8.3' 2024-03-29 16:25:40 +00:00
Jakub Zelenka
f4a9ae90f9
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-29 16:25:09 +00:00
Jakub Zelenka
c1bd9a932a
Fix GH-10495: feof on OpenSSL stream hangs indefinitely
This fixes the issue with unbounded waiting on SSL_peek which can happen
when only part of the record is fetched. It makes socket non blocking so
it is possible to verify if OpenSSL is expecting some more data or if
there is an error.

This also fixes bug #79501

Closes GH-13487
2024-03-29 16:22:22 +00:00
Jakub Zelenka
894e17c139
Merge branch 'PHP-8.3' 2024-03-29 16:09:48 +00:00
Jakub Zelenka
caec2b6186
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-29 16:09:09 +00:00
Jakub Zelenka
c087398cc2
Fix GH-13264: Part 1 - Memory leak on filter failure
Closes GH-13790
2024-03-29 16:06:49 +00:00
Jakub Zelenka
cd6a58114e Fix NEWS for the last FPM change 2024-03-29 16:05:13 +00:00
Michael Voříšek
a470110ff4 Add tests for destructors behaviour with GC 2024-03-29 16:41:22 +01:00
Paul Ripke
2d6bd1644d Fixed GH-13581: threaded mod_php fails on NetBSD with No space available for Thread Local Storage.
Close GH-13832
2024-03-29 15:16:51 +00:00
David Carlier
b82024b13c ext/sockets: adding Linux's TCP_SYNCNT constant.
Useful to control how many SYN packets the client will send to the
server before giving up establishing a connection if the server does
not respond (usually 5 or 6 by default).

Close GH-13816
2024-03-29 14:52:53 +00:00
Jakub Zelenka
4bc7ea3437
Merge branch 'PHP-8.3' 2024-03-28 15:46:22 +00:00
Jakub Zelenka
8edd621501
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-28 15:45:45 +00:00
Jakub Zelenka
d0a8d41eee
Fix GH-13563: Setting bool values via env in FPM config fails
Closes GH-13786
2024-03-28 15:43:50 +00:00
Peter Kokot
413f2cd427
Refactor root build directories (#13785)
This adds all root build directories in one call. PEAR directory is
created only when enabled and duplicated Zend directory creation is
removed, because it was intended for the zend_config.h when building
out-of-source or using the config.status manually before the
PHP_ADD_BUILD_DIR was introduced in the build system.
2024-03-27 16:20:03 +01:00
SATŌ Kentarō
f00e05ee9c
Remove setlocale pragma that no longer is significant. (#13814) 2024-03-27 09:06:07 +01:00
Remi Collet
6c5814dade
revert base64_encode change 2024-03-27 08:08:43 +01:00
Dmitry Stogov
9fae55f5db Update IR
IR commit: 87cba9af675afd2ca20cbaab397ad1c83d700475
2024-03-27 00:06:15 +03:00
Niels Dossche
6316eb1b2c Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13433: Segmentation Fault in zend_class_init_statics when using opcache.preload
2024-03-26 21:29:29 +01:00
Niels Dossche
55e617691a Fix GH-13433: Segmentation Fault in zend_class_init_statics when using opcache.preload
This regressed in 9a250cc9d6, which allowed static properties to get
overridden by a trait during inheritance. In particular, because of the
change to the loop in zend_update_parent_ce(), it's not guaranteed that
all indirects are after one another.

This means that during persisting the zvals of the static members table,
some static properties may be skipped. In case of the test code, this
means that the array in the trait will keep referring to the old, new
freed, stale value. To solve this, we check the type for IS_INDIRECT,
which is the same as what zend_persist_calc() is already doing anyway.

Since 2543e61aed we can check for IS_INDIRECT to see if it should be
persisted or not.

Closes GH-13794.
2024-03-26 21:29:07 +01:00
Eric Mann
93b49d9b75
Merge branch 'PHP-8.3' 2024-03-26 10:26:31 -07:00
Eric Mann
9381129d1b
PHP-8.3 is now for PHP 8.3.6-dev 2024-03-26 09:08:14 -07:00
Pierrick Charron
0966f1ffe2
Merge branch 'PHP-8.3'
* PHP-8.3:
  PHP-8.2 is now for PHP 8.2.19-dev
2024-03-26 08:51:08 -04:00
Pierrick Charron
6b40a5af09
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.19-dev
2024-03-26 08:50:36 -04:00
Remi Collet
dd6e738fe4
[ci skip] NEWS for base64_encode 2024-03-26 13:50:31 +01:00
Pierrick Charron
7942268899
PHP-8.2 is now for PHP 8.2.19-dev 2024-03-26 08:49:44 -04:00
Remi Collet
b5446e42b2
add $padding option to base64_encode 2024-03-26 13:45:32 +01:00
Arnaud Le Blanc
412e32d29d Merge branch 'PHP-8.3'
* PHP-8.3:
  Tests are not repeatable
2024-03-26 12:35:40 +01:00
Arnaud Le Blanc
667586bb61 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Tests are not repeatable
2024-03-26 12:35:20 +01:00
Arnaud Le Blanc
bb6b659aa8 Tests are not repeatable
gc_threshold is inherited accross requests, so the tests fail when repeating
2024-03-26 12:33:44 +01:00
Arnaud Le Blanc
c7ca3e5c27 Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip]
  [ci skip]
  Adjust GC threshold if num_roots is higher than gc_threshold after collection (#13758)
2024-03-25 16:24:48 +01:00
Arnaud Le Blanc
ff2359b62e [ci skip] 2024-03-25 16:23:44 +01:00
Arnaud Le Blanc
9a51a7fb30 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip]
  Adjust GC threshold if num_roots is higher than gc_threshold after collection (#13758)
2024-03-25 16:22:54 +01:00
Arnaud Le Blanc
f968a63162 [ci skip] 2024-03-25 16:19:32 +01:00
Arnaud Le Blanc
c13794cdcb
Adjust GC threshold if num_roots is higher than gc_threshold after collection (#13758)
This fixes an edge case causing the GC to be triggered repeatedly.

Destructors might add potential garbage to the buffer, so it may happen that num_root it higher than gc_threshold after collection, thus triggering a GC run almost immediately. This can happen by touching enough objects in a destructor, e.g. by iterating over an array. If this happens again in the new run, and the threshold is not updated, the GC may be triggered again.

The edge case requires specific conditions to be triggered and it must happen rarely in practice:

 * At least GC_THRESHOLD_TRIGGER (100) objects must be collected during each run for the threshold to not be updated
 * At least GC_G(gc_threshold) (initially 10k) objects must be touched (decref'ed to n>0) by any destructor during each run to fill the buffer

The fix is to increase the threshold if GC_G(num_roots) >= GC_G(gc_threshold) after GC. The threshold eventually reaches a point at which the second condition is not met anymore.

The included tests trigger more than 200 GC runs before the fix, and 2 after the fix (dtors always trigger a second run).

A related issue is that zend_gc_check_root_tmpvars() may add potential garbage before the threshold is adjusted, which may trigger GC and exhaust the stack. This is fixed by setting GC_G(active)=1 around zend_gc_check_root_tmpvars().
2024-03-25 16:17:54 +01:00
Alexander M. Turek
ef93086765
DOM stubs: Reference interfaces from the global namespace correctly (#13801) 2024-03-25 12:06:18 +01:00
Jorg Adam Sowa
f69d540541
Removed impossible paths from session_decode and session_encode (#13796) 2024-03-24 20:20:42 +01:00