1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Commit Graph

6093 Commits

Author SHA1 Message Date
Niels Dossche a4674654ab opcache: change uses of sprintf into snprintf 2024-06-14 08:12:03 -07:00
Peter Kokot 5d3fab9334 Sync #if/ifdef/defined (#14520)
These are either undefined or defined (to value 1):
- __DragonFly__
- __FreeBSD__
- HAS_MCAST_EXT
- HAVE_GETCWD
- HAVE_GETWD
- HAVE_GLIBC_ICONV
- HAVE_JIT
- HAVE_LCHOWN
- HAVE_NL_LANGINFO
- HAVE_RL_CALLBACK_READ_CHAR
- HAVE_RL_ON_NEW_LINE
- HAVE_SQL_EXTENDED_FETCH
- HAVE_UTIME

Follow up of GH-5526 (-Wundef)
2024-06-11 22:47:05 +02:00
Gina Peter Banyard 7130a174bb ext/opcache/jit: Fix -Wundef warning for HAVE_CAPSTONE
All other times this symbol is references #ifdef is used
2024-06-10 14:19:59 +01:00
Dmitry Stogov 6c9d443a21 Update IR
IR commit: 5be6dd81f19f85bc06085617e7231f8699d7f9b0
2024-06-10 11:49:08 +03:00
Peter Kokot 84a0da1574 Sync #if/ifdef/defined (#14508)
This syncs CPP macro conditions:
- _WIN32
- _WIN64
- HAVE_ALLOCA_H
- HAVE_ALPHASORT
- HAVE_ARPA_INET_H
- HAVE_CONFIG_H
- HAVE_DIRENT_H
- HAVE_DLFCN_H
- HAVE_GETTIMEOFDAY
- HAVE_LIBDL
- HAVE_POLL_H
- HAVE_PWD_H
- HAVE_SCANDIR
- HAVE_SYS_FILE_H
- HAVE_SYS_PARAM_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_TIME_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_WAIT_H
- HAVE_UNISTD_H
- PHP_WIN32
- ZEND_WIN32

These are either undefined or defined to 1 in Autotools and Windows.

Follow up of GH-5526 (-Wundef).
2024-06-09 14:23:41 +02:00
Peter Kokot 743d1fd2a2 Sync -Wno-implicit-fallthrough
This is a sync of the https://github.com/php/php-src/pull/6252 after few
years:
- ext/date: pending recheck in GH-14187
- ext/hash: warning happens only on 32-bit build in
  ext/hash/sha3/generic32lc/KeccakP-1600-inplace32BI.c
- ext/opcache: IR JIT doesn't seem to have this issue
- ext/pcre remains disabled due to pcre2lib/sljit/sljitNativeARM_64.c
  (should be rechecked and fixed upstream)
2024-06-08 20:04:21 +02:00
Niels Dossche 89c4e4c4cb Fix GH-11188: Error when building TSRM in ARM64 (for IR JIT) (#14459)
This is GH-11236 for IR JIT.
2024-06-04 19:47:07 +02:00
Dmitry Stogov 802612bb54 Update IR
IR commit: 97555e12b525b825ab3b2f12bfdfd5cb6c00b2b4
2024-06-03 12:20:07 +03:00
Peter Kokot ca55603d8a Wrap ext/opcache AC_RUN_IFELSE checks in AC_CACHE_CHECK (#14436)
Cache variables php_cv_shm_ipc and php_cv_shm_mmap_anon enable manual
overriding of checks when cross-compiling.
2024-06-02 19:51:47 +02:00
Arnaud Le Blanc cc6d9523d9 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix TLS access in JIT on FreeBSD/amd64
2024-05-28 15:45:45 +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] https://github.com/freebsd/freebsd-src/blob/bf56e8b9c8639ac4447d223b83cdc128107cc3cd/libexec/rtld-elf/rtld.c#L5260

Closes GH-13928
2024-05-28 15:42:57 +02:00
Dmitry Stogov 5109cf1010 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix incorrect conditions
2024-05-28 08:38:00 +03: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
Dmitry Stogov 58c281a6cf JIT: Add CPU registers support for ASSIGN_OBJ and ASSIGN_OBJ_OP (#14303)
* JIT: Add CPU registers support for ASSIGN_OBJ and ASSIGN_OBJ_OP

* Fix tests failures

* Fix tests failures

* Add missing GUARD
2024-05-23 19:25:06 +03:00
Ilija Tovilo 706e9ed058 Merge branch 'PHP-8.3'
* PHP-8.3:
  Skip JIT test if php is compiled without jit
2024-05-23 16:35:58 +02: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
Dmitry Stogov 93c20de2f0 Update IR
IR commit: e87914bda3939072bf1e470e923599d73063d9f1
2024-05-23 09:40:35 +03:00
Dmitry Stogov ace18f4919 JIT: Avoid IS_UNDEF check for ZEND_FETCH_DIM/OBJ_IS with a result type guard (#14298) 2024-05-22 17:33:40 +03:00
Ilija Tovilo 92b9543ca9 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix enabling of JIT at runtime
2024-05-22 14:33:33 +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
Cristian Rodríguez 8e62e2b829 Mark multple functions as static (#13864)
* Mark many functions as static

Multiple functions are missing the static qualifier.

* remove unused struct sigactions

struct sigaction act, old_term, old_quit, old_int;
all unused.

* optimizer: minXOR and maxXOR are unused
2024-05-22 13:11:46 +02:00
Dmitry Stogov 896517e24f JIT: Fix missing register store
Fixes master_COMMUNITY_asan "nightly" failure introduced by 13d5c812e0
2024-05-21 14:11:26 +03:00
Dmitry Stogov 13d5c812e0 JIT: Add CPU registers support for FETCH_OBJ_R (#14253) 2024-05-19 22:18:30 +03:00
Ilija Tovilo 600d591cae Omit FETCH_THIS in closures
Non-static closures are guaranteed to have $this. The existing comment
highlights this, but fails to handle it correctly.

Closes GH-14181
2024-05-16 12:28:11 +02:00
Dmitry Stogov 5e7baaaad1 JIT: Remove old restriction. FETCH_DIM_R supports regs for indexes.
This affects only function JIT.
2024-05-16 12:02:03 +03:00
Dmitry Stogov 7843e72f3b JIT: Avoid useless EG(exception) check in ASSIGN_DIM_OP (#14247) 2024-05-15 21:31:44 +03:00
Dmitry Stogov 5ef1824ebc JIT: Improve x86_64 code generated for PHP Array Bounds Checks (#14246) 2024-05-15 16:38:23 +03:00
Dmitry Stogov 0eb68eb8d8 JIT: Fix incorrect deoptimization info
Fixes third recently introduced failure in "Nightly" "master_COMMUNUTY_asan" job
2024-05-15 14:22:20 +03:00
Dmitry Stogov 273c2de6a7 JIT: Fix incorrect PHP register allocation
Fixes 2 of 3 recently introduced failures in "Nightly"
"master_COMMUNUTY_asan" job
2024-05-15 12:46:58 +03:00
Dmitry Stogov 446ff6a742 JIT: Implement CPU register usage for ASSIGN_DIM_OP (#14236) 2024-05-14 23:35:31 +03:00
Dmitry Stogov 4a91c8a1be JIT: Implement CPU register usage for ASSIGN_OP (#14235) 2024-05-14 22:54:00 +03:00
Dmitry Stogov c8920aaf94 JIT: JIT: Implement CPU register usage for ISSET_ISEMPTY_DIM (#14227) 2024-05-14 14:05:04 +03:00
Dmitry Stogov 64f4aca6ba IT: Implement CPU register usage for FETCH_DIM_W (#14225) 2024-05-14 13:19:56 +03:00
Dmitry Stogov bf7d4d7eb2 JIT: Implement CPU register usage for ASSIGN_DIM (#14224) 2024-05-14 12:10:28 +03:00
Dmitry Stogov 89305574b2 JIT: Improve CPU register usage in FETCH_DIM_R, FETCH_DIM_IS and FETCH_LIST_R (#14222) 2024-05-14 01:12:01 +03:00
Dmitry Stogov 7e2831f074 Update IR
IR commit: 94e71e613221e79b033c48b54230e128755c95f9
2024-05-13 20:26:24 +03:00
Dmitry Stogov bb21d195c1 Update IR
IR commit: fe4ba285bc576d83bea4a8099fb7315b8bc8c7fb
2024-05-06 22:22:15 +03:00
Ilija Tovilo 858008b1c6 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix persisting of inherited class constants
2024-05-06 16:02:29 +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
Niels Dossche 8aec95e23f Fix build on Clang 18 (#14136)
Clang 18 only allows counted_by to work on real flexible array members,
not ones with a zero size. Otherwise you get errors like:
```
ext/opcache/jit/zend_jit_ir.c:149:12: error: 'counted_by' only applies to C99 flexible array members
```
2024-05-04 19:17:42 +02:00
Ilija Tovilo 1c30c5e707 Print location on class redeclaration
Fixes GH-13950
Closes GH-13999
2024-04-30 14:34:43 +02:00
Dmitry Stogov 8e4363de55 Update IR
IR commit: 3b35a1fd61b2b72da8a0852549880d2aff391dbe
2024-04-26 23:53:27 +03:00
Dmitry Stogov bad5d2c78a Update IR
IR commit: ae34ae52b7b1c359afa03a0a1f45cbf689a64471
2024-04-26 02:40:42 +03:00
Dmitry Stogov 71194ea767 Update IR
IR commit: 65586bd4cf9cd2d3b41492f52823c5083cea77e4
2024-04-23 23:14:54 +03:00
Ørjan Malde ff76cb738b rudimentary midipix port (#13896) 2024-04-18 08:19:44 +02:00