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
Dmitry Stogov
b46ee531bd
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fixed incorrect elimination of refcounted check in JIT for BIND_GLOBAL
2023-12-18 11:29:17 +03:00
Dmitry Stogov
c67f6f449c
Fixed incorrect elimination of refcounted check in JIT for BIND_GLOBAL
...
Fixes oss-fuzz #65135
2023-12-18 11:27:55 +03:00
Ilija Tovilo
719236e3ec
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix SELinux mprotect execheap error due to mem adjacent to heap
2023-12-13 11:26:23 +01:00
Ilija Tovilo
7cf1a2ad9d
Fix SELinux mprotect execheap error due to mem adjacent to heap
...
It seems SELinux has a bug where memory directly adjacent to the heap is
interpreted as heap memory. Dodge this issue by leaving some space between the
heap and memory suggested by find_prefered_mmap_base.
See GH-12932
See https://bugzilla.kernel.org/show_bug.cgi?id=218258
Closes GH-12942
2023-12-13 11:25:48 +01:00
Ilija Tovilo
e83a5683f9
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix zend_jit_undefined_long_key overwriting dim when dim == result
2023-12-11 15:07:44 +01:00
Ilija Tovilo
623da03845
Fix zend_jit_undefined_long_key overwriting dim when dim == result
...
Fixes oss-fuzz #64727
Closes GH-12900
2023-12-11 15:07:09 +01:00
Dmitry Stogov
1bf55959eb
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
JIT: Fix .debug_abbrev section in GDB JIT API.
2023-12-11 10:09:38 +03:00
Dmitry Stogov
ff22409082
JIT: Fix .debug_abbrev section in GDB JIT API.
2023-12-11 10:08:55 +03:00
Ilija Tovilo
8524da6d30
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix asan shadow memory and shared_alloc_mmap clash
2023-12-07 18:29:14 +01:00
Ilija Tovilo
53909896e0
Fix asan shadow memory and shared_alloc_mmap clash
...
The memory region found by find_prefered_mmap_base may clash with memory regions
reserved by asan for tracking memory. The symptom of this is that mprotect for
JIT fails adding the PROT_EXEC flag to the shared memory region.
Closes GH-12890
2023-12-07 18:28:21 +01:00
Dmitry Stogov
8c9b5996be
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fixed type inference
2023-12-01 17:09:09 +03:00
Dmitry Stogov
1e55c97601
Fixed type inference
...
Fixes oss-fuzz #64577 , #64579 , #64589
2023-12-01 17:08:16 +03:00
Dmitry Stogov
64851873da
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W
2023-11-28 23:33:45 +03:00
Dmitry Stogov
423a1e586e
Fixed GH-8251: Narrowing occurred during type inference of ZEND_FETCH_DIM_W
2023-11-28 22:49:39 +03:00
Dmitry Stogov
8b5767af75
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning (#12817 )
2023-11-28 21:20:35 +03:00
Dmitry Stogov
39a813d9ca
Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning ( #12817 )
...
* Fixed GH-12812: Integer string in variable used as offset produces wrong undefined array key warning
* Fixed register names
2023-11-28 21:19:57 +03:00
Gina Peter Banyard
c70219e4aa
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
jit: fixed JIT "Attempt to assign property of non-object" warning emitted at the same time as Error is being thrown
2023-11-27 16:20:44 +00:00
Gina Peter Banyard
126a255d66
jit: fixed JIT "Attempt to assign property of non-object" warning emitted at the same time as Error is being thrown
2023-11-27 16:19:35 +00:00
Gina Peter Banyard
52463ae233
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
jit: fixed "Uninitialized string offset" warning being emitted at the same time as invalid offset Error
2023-11-27 16:06:15 +00:00
Gina Peter Banyard
ed8b901869
jit: fixed "Uninitialized string offset" warning being emitted at the same time as invalid offset Error
2023-11-27 16:04:41 +00:00
Dmitry Stogov
6f355c6c79
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error
2023-11-22 13:26:07 +03:00
Dmitry Stogov
2d65d714a3
Fixed GH-12748: Function JIT emits "could not convert to int" warning at the same time as invalid offset Error
2023-11-22 13:19:10 +03:00
Dmitry Stogov
f48ab6a66f
Fixed GH-12747: Function JIT returns invalid error message for coalesce operator on invalid offset
2023-11-22 13:01:35 +03:00
David Carlier
501f0f8b7d
Merge branch 'PHP-8.2' into PHP-8.3
2023-11-21 21:02:10 +00:00
Muhammad Moinur Rahman
6be4ba9f90
Add host_cpu type for FreeBSD
...
In FreeBSD world x86_64 host type is identified as amd64 so add proper
checks for FreeBSD amd64 hosts.
Close GH-12736
2023-11-21 21:01:38 +00:00