Dmitry Stogov
728b81d92e
Prevent recording traces started from usupported VM instruction
2024-02-19 13:22:30 +03: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
94ba883e19
Fix TLS access in JIT with MUSL ( #13329 )
2024-02-12 08:13:23 +03: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
1c1d785c4f
[skip ci] Fix 64-bit only test
2024-01-23 17:32:59 +01:00
Dmitry Stogov
f120ac93a1
Fix GH-12481: PHP crash with JIT enabled
2024-01-22 15:56:12 +03:00
Dmitry Stogov
5350952a37
Fix assertion
...
Fixes oss-fuzz #65233
2023-12-25 13:22:03 +03:00
Dmitry Stogov
731734dacb
Fixed type inference
...
Fixes oss-fuzz #65150
2023-12-18 12:27:35 +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
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
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
ff22409082
JIT: Fix .debug_abbrev section in GDB JIT API.
2023-12-11 10:08:55 +03: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
1e55c97601
Fixed type inference
...
Fixes oss-fuzz #64577 , #64579 , #64589
2023-12-01 17:08:16 +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
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
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
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
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
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
Dmitry Stogov
db26aee801
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660 )
2023-11-13 13:27:11 +03:00
Dmitry Stogov
c60c2a0d67
Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed ( #12660 )
2023-11-13 13:26:17 +03:00
Dmitry Stogov
6bf4041398
Backport fix for HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag ( #12591 )
...
* Fixed HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag
This fixes GH-12527
* typo
2023-11-03 10:54:57 +03:00
Dmitry Stogov
bbf2fc99a3
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Don't JIT after fatal errors
2023-11-02 14:14:48 +03:00
Dmitry Stogov
77a497d56a
Don't JIT after fatal errors
2023-11-02 14:14:12 +03:00
Dmitry Stogov
177a6f5d8a
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT
2023-11-02 08:11:00 +03:00
Dmitry Stogov
798b9d097b
Fixed GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT
2023-11-02 08:09:29 +03:00
Dmitry Stogov
125dbb2c03
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed inorrect QM_ASSIGN elimination
2023-11-01 09:55:28 +03:00
Dmitry Stogov
19dfe05f16
Fixed inorrect QM_ASSIGN elimination
...
Fixes oss-fuzz #63771
2023-11-01 09:54:58 +03:00
Dmitry Stogov
4b82ed4387
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Backport fix for incorrect assumption about in-memory zval type
2023-10-31 11:59:08 +03:00
Dmitry Stogov
455a967934
Backport fix for incorrect assumption about in-memory zval type
2023-10-31 11:56:01 +03:00
Dmitry Stogov
14b36c8583
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed GH-12511: Use must be in next opline assertion with patched infection
2023-10-31 07:52:38 +03:00
Dmitry Stogov
b3b46a44c5
Fixed GH-12511: Use must be in next opline assertion with patched infection
2023-10-31 07:51:36 +03:00
Dmitry Stogov
770c1b0361
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed GH-12509: JIT assertion when running php-parser tests
2023-10-26 23:59:03 +03:00
Dmitry Stogov
5f46d86955
Fixed GH-12509: JIT assertion when running php-parser tests
2023-10-26 23:58:29 +03:00
Dmitry Stogov
76724fc4ac
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed regression intoduced by 76c41d27f9
2023-10-25 15:15:39 +03:00
Dmitry Stogov
fbf4e196da
Fixed regression intoduced by 76c41d27f9
2023-10-25 15:15:13 +03:00
Dmitry Stogov
7320f33f7f
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed incorrect type inference
2023-10-24 18:48:58 +03:00
Dmitry Stogov
aa45df4849
Fixed incorrect type inference
2023-10-24 18:48:29 +03:00
Dmitry Stogov
9668077f6b
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed GH-12482: Abortion with tracing JIT
2023-10-24 14:21:06 +03:00
Dmitry Stogov
76c41d27f9
Fixed GH-12482: Abortion with tracing JIT
2023-10-24 14:20:35 +03:00
Dmitry Stogov
fed7937d27
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
memory_consumption must be page aligned
2023-10-23 12:10:54 +03:00
Dmitry Stogov
e270ee3008
memory_consumption must be page aligned
2023-10-23 12:10:11 +03:00
Dmitry Stogov
6be3c18d38
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed GH-12494: Zend/tests/arginfo_zpp_mismatch.phpt causes a segfault withJIT + --repeat 2
2023-10-23 10:51:48 +03:00
Dmitry Stogov
e0ca4dca5b
Fixed GH-12494: Zend/tests/arginfo_zpp_mismatch.phpt causes a segfault withJIT + --repeat 2
2023-10-23 10:50:55 +03:00
Ilija Tovilo
b49e178563
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Avoid JIT warning with opcache.jit_buffer_size=0
2023-10-18 10:49:07 +02:00
Ilija Tovilo
07d81592e9
Avoid JIT warning with opcache.jit_buffer_size=0
...
Closes GH-12460
2023-10-18 10:46:30 +02:00
Dmitry Stogov
ef91794264
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed GH-11917: primitives seem to be passed via reference instead of by value under some conditions when JIT is enabled on windows (#12451 )
2023-10-17 01:58:36 +03:00
Dmitry Stogov
89eb1c64a9
Fixed GH-11917: primitives seem to be passed via reference instead of by value under some conditions when JIT is enabled on windows ( #12451 )
2023-10-17 01:58:07 +03:00
Dmitry Stogov
0c6999cf94
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fixed GH-12428: Assertion with function/tracing JIT
2023-10-16 15:12:29 +03:00