Commit Graph

5854 Commits

Author SHA1 Message Date
Dmitry Stogov
e842ddfe4f
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14475: PHP 8.3.7 with JIT encounters infinite loop on specific paths (#14558)
2024-06-17 09:38:02 +03:00
Dmitry Stogov
350af549a0
Fix GH-14475: PHP 8.3.7 with JIT encounters infinite loop on specific paths (#14558) 2024-06-17 09:37:44 +03:00
Niels Dossche
3e8752169c
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-11188: Error when building TSRM in ARM64
2024-06-03 21:11:20 +02:00
nielsdos
644d3628e3
Fix GH-11188: Error when building TSRM in ARM64
Although the issue mentioned FreeBSD, this is a broader problem:
the current ARM64 code to load the TLS offset assumes a setup with
the non-default TLS model. This problem can also apply on some
configurations on other platforms.

Closes GH-11236.
2024-06-03 20:28:55 +02:00
Arnaud Le Blanc
5e895dda15
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix TLS access in JIT on FreeBSD/amd64
2024-05-28 15:43:59 +02:00
Arnaud Le Blanc
79862f24da
Fix TLS access in JIT on FreeBSD/amd64
DTV elements are 8 bytes in size a per ABI [1], and the index is offset by 1
on FreeBSD [2]

[1] http://people.redhat.com/drepper/tls.pdf
[2] bf56e8b9c8/libexec/rtld-elf/rtld.c (L5260)

Closes GH-13928
2024-05-28 15:42:57 +02:00
Dmitry Stogov
034bd85ad1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix incorrect conditions
2024-05-28 08:37:48 +03:00
Dmitry Stogov
48ae025c33
Fix incorrect conditions 2024-05-28 08:37:20 +03:00
Ilija Tovilo
69a800151b
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Skip JIT test if php is compiled without jit
2024-05-23 16:35:51 +02:00
Ilija Tovilo
04c9749e35
Skip JIT test if php is compiled without jit 2024-05-23 16:35:29 +02:00
Ilija Tovilo
706e79761e
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix enabling of JIT at runtime
2024-05-22 14:33:25 +02:00
Ilija Tovilo
9506ca6001
Fix enabling of JIT at runtime
Fixes GH-14267
Closes GH-14294
2024-05-22 14:32:43 +02:00
Ilija Tovilo
929bbb23d1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix persisting of inherited class constants
2024-05-06 16:02:20 +02:00
Ilija Tovilo
42ede5597e
Fix persisting of inherited class constants
Class constants are inherited to user classes without cloning. Thus, internal
class constants should not be persisted at all. Simply keep pointing to the
internal class constant.

Fixes GH-14109
Closes GH-14114
2024-05-06 16:00:48 +02:00
Bob Weinand
639a0d78d7 Merge branch 'PHP-8.2' of https://github.com/php/php-src into PHP-8.3 2024-04-10 20:38:23 +02:00
Bob Weinand
ea927caffa
Fix exception IP in JIT (#13929) 2024-04-10 20:37:54 +02:00
Bob Weinand
5ead5c5a11 Merge branch 'PHP-8.2' into PHP-8.3 2024-04-08 20:19:46 +02:00
Bob Weinand
e48a5c14b9 Add zend_test.observer.enabled=0 to opcache tests asserting specific TMP count
Necessary to succeed when tests are run with zend_test.observer.enabled=1.
2024-04-08 20:16:35 +02:00
Bob Weinand
f52b2a9cdc Merge branch 'PHP-8.2' into PHP-8.3 2024-04-08 15:10:29 +02:00
Bob Weinand
af098acd6e Always load EX(opline) into the current frame in JIT when observers are enabled
Fixes #13772.
Closes #13776.
2024-04-08 15:09:14 +02:00
Bob Weinand
dbaeb62ab1 Merge branch 'PHP-8.2' of github.com:php/php-src into PHP-8.3 2024-04-02 18:11:55 +02:00
Bob Weinand
e7462bff19
Run one testsuite with observers enabled in CI (#13869)
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2024-04-02 18:11:02 +02:00
Niels Dossche
e34c86ce1a
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix gcc-14 Wcalloc-transposed-args warnings
2024-04-01 20:34:37 +02:00
Cristian Rodríguez
18d70db091
Fix gcc-14 Wcalloc-transposed-args warnings
gcc-14 and later warns of inverted arguments in calloc or
calloc-like __alloc_size__ annotated functions.

Closes GH-13818.
2024-04-01 20:34:14 +02: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
Bob Weinand
6d6cd29909 Merge branch 'PHP-8.2' of https://github.com/php/php-src into PHP-8.3 2024-03-18 19:04:12 +01:00
Bob Weinand
10d912d6e3
Fix GH-13712: Segmentation fault for enabled observers when calling trait method of internal trait when opcache is loaded (#13735)
Inherited methods regardless of source must share the original runtime cache. Traits were missed.
This adds ZEND_ACC_TRAIT_CLONE to internal functions as well to allow easy distinction of these.
2024-03-18 19:02:42 +01:00
Bob Weinand
35aef8ee87 Merge branch 'PHP-8.2' of https://github.com/php/php-src into PHP-8.3 2024-03-18 17:22:23 +01:00
Bob Weinand
6fb8b9d721 Fix possible segfault with 0x0 shared opcache base
Moving the minimum base of the shared opcache memory to the second huge page to avoid a possible 0x0 base, which may cause all sorts of segfaults.
This is not a problem on most systems which have a mmap_min_addr which is non-zero, but e.g. WSL1 doesn't have a minimum mapping address.
2024-03-18 17:18:33 +01:00
David Carlier
868257a3de Fix GH-13727: macro generating invalid call test prototypes fixes.
autoconf/libtool generating code to test features missed `void` for
C calls prototypes w/o arguments.
Note that specific changes related to libtool have to be upstreamed.

Co-authored-by: Peter Kokot <petk@php.net>

close GH-13732
2024-03-18 06:53:39 +00:00
Arnaud Le Blanc
a4d769ccb3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix GH-13508: JITed QM_ASSIGN may be optimized out when op1 is null (#13610)
2024-03-11 15:13:56 +01:00
Arnaud Le Blanc
0ea80126ea
Fix GH-13508: JITed QM_ASSIGN may be optimized out when op1 is null (#13610)
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2024-03-11 15:10:12 +01:00
Ilija Tovilo
5cbcc10c6c
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Remove MAP_JIT flag
2024-03-09 23:09:13 +01:00
Ilija Tovilo
00f9c5eeb4
Remove MAP_JIT flag
This flag is supposed to go on the flags parameter, rather than prot. Moreover,
this flag is no longer needed because the JIT does not set RWX without ZTS, and
JIT+ZTS has been disabled on macOS with Apple Silicon.

Closes GH-13638
2024-03-09 23:08:44 +01:00
Dmitry Stogov
00259952e4 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Prevent recording traces started from usupported VM instruction
2024-02-19 13:23:05 +03:00
Dmitry Stogov
728b81d92e Prevent recording traces started from usupported VM instruction 2024-02-19 13:22:30 +03:00
Ilija Tovilo
f057d2b138
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disable JIT on Apple Silicon + ZTS
2024-02-18 00:08:42 +01:00
Ilija Tovilo
6db95512b4
Disable JIT on Apple Silicon + ZTS
Apple Silicon has stricter rules about rwx mmap regions. They need to be created
using the MAP_JIT flag. However, the MAP_JIT seems to be incompatible with
MAP_SHARED. ZTS requires MAP_SHARED so that some threads may execute code from a
page while another writes/appends to it. We did not find another solution, other
than completely disabling JIT for Apple Silicon + ZTS.

See discussion in https://github.com/php/php-src/pull/13351.

Co-authored-by: Peter Kokot <peterkokot@gmail.com>
Fixes GH-13400
Closes GH-13396
2024-02-18 00:07:46 +01:00
Dmitry Stogov
667b08c953 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix TLS access in JIT with MUSL (#13329)
2024-02-12 08:14:08 +03:00
Dmitry Stogov
94ba883e19
Fix TLS access in JIT with MUSL (#13329) 2024-02-12 08:13:23 +03:00
Niels Dossche
31e8cea1d6 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13232: Segmentation fault will be reported when JIT is off but JIT_debug is still on
2024-01-24 17:48:57 +01:00
Niels Dossche
d417072ebe Fix GH-13232: Segmentation fault will be reported when JIT is off but JIT_debug is still on
Closes GH-13234.
2024-01-24 17:47:40 +01:00
Ilija Tovilo
ea8d143a59
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Fix 64-bit only test
2024-01-23 17:33:17 +01:00
Ilija Tovilo
1c1d785c4f
[skip ci] Fix 64-bit only test 2024-01-23 17:32:59 +01:00
Dmitry Stogov
0becd4856d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12481: PHP crash with JIT enabled
2024-01-22 15:57:01 +03:00
Dmitry Stogov
f120ac93a1 Fix GH-12481: PHP crash with JIT enabled 2024-01-22 15:56:12 +03:00
Dmitry Stogov
fd58f61a22 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix assertion
2023-12-25 13:22:39 +03:00
Dmitry Stogov
5350952a37 Fix assertion
Fixes oss-fuzz #65233
2023-12-25 13:22:03 +03:00
Dmitry Stogov
555e8f82e8 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed type inference
2023-12-18 12:28:25 +03:00
Dmitry Stogov
731734dacb Fixed type inference
Fixes oss-fuzz #65150
2023-12-18 12:27:35 +03:00