Tim Düsterhus
b43a7ac0e7
Zend: Make EG(fake_scope)
a const zend_class_entry*
( #19060 )
2025-07-09 11:55:53 +02:00
Daniil Gentili
f6f0aed9f3
Allow using fast destruction path when ASAN is in use ( #18835 )
2025-06-30 18:37:20 +02:00
DanielEScherzer
3f03f7ed3d
[RFC] Add support for attributes on compile-time constants
...
https://wiki.php.net/rfc/attributes-on-constants
2025-04-29 11:53:09 -07:00
Ilija Tovilo
16c4c066f4
Make empty_fcall_info and empty_fcall_info_cache macros
...
See https://github.com/php/php-src/pull/18273 , a constant may cause
unnecessary cache misses.
Closes GH-18326
2025-04-15 12:51:10 +02:00
Gina Peter Banyard
b4f275f9f8
Zend: Use ZEND_FCI_INITIALIZED() macro to check if an FCI is initialized ( #17291 )
2025-01-31 12:10:44 +00:00
Eric Norris
0a14ab18d2
RFC: Error Backtraces v2 ( #17056 )
...
see https://wiki.php.net/rfc/error_backtraces_v2
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2025-01-29 12:54:23 +01:00
Niels Dossche
afc1f0d99b
Merge branch 'PHP-8.4'
...
* PHP-8.4:
Fix GH-17216: Trampoline crash on error
2024-12-21 00:26:37 +01:00
Niels Dossche
627432785e
Merge branch 'PHP-8.3' into PHP-8.4
...
* PHP-8.3:
Fix GH-17216: Trampoline crash on error
2024-12-21 00:26:23 +01:00
Niels Dossche
2c3b56ded0
Fix GH-17216: Trampoline crash on error
...
The error handling is incomplete on argument cleanup.
1. The fci is not cleared which means that zend_free_trampoline() is
never called.
2. The cleaning for extra named arguments was missing, resulting in
memory leak.
Closes GH-17219.
2024-12-21 00:25:06 +01:00
Daniel Scherzer
f5e743a520
Add ReflectionConstant::getFileName()
...
Allow determining the name of the file that defined a constant, when the
constant was defined in userland code via const or define(). For constants
defined by PHP core or extensions, false is returned, matching the existing
getFileName() methods on other reflection classes.
Fixes GH-15723
Closes GH-15847
2024-10-31 16:47:45 +01:00
DanielEScherzer
ea297654f4
Zend/*: fix a bunch of typos (GH-16017)
...
* Zend/*: fix a bunch of typos
* Zend/tests/try/try_catch_finally_005.phpt: update string length
2024-09-24 10:55:21 +02:00
Arnaud Le Blanc
58aa6fc830
Lazy objects
...
RFC: https://wiki.php.net/rfc/lazy-objects
Closes GH-15019
2024-08-30 17:30:03 +02:00
Ilija Tovilo
780a8280d2
[RFC] Property hooks ( #13455 )
...
RFC: https://wiki.php.net/rfc/property-hooks
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2024-07-14 11:55:03 +02:00
Peter Kokot
c3388c1841
Sync #if/ifdef/defined ( #14512 )
...
These are either undefined or defined to 1:
- HAVE_LIBEDIT
- HAVE_LIBREADLINE
- ZEND_MAX_EXECUTION_TIMERS
Follow up of GH-5526 (-Wundef)
2024-06-10 08:56:10 +02:00
Arnaud Le Blanc
7c5d6557e1
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
2024-05-28 15:27:32 +02:00
Arnaud Le Blanc
3b2764bc76
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
2024-05-28 15:26:53 +02:00
Manuel Kress
272da51bfd
Use ITIMER_REAL for timeout handling on MacOS / Apple Silicon system
...
setitimer(ITIMER_PROF) fires too early on MacOS 14 when running on Apple
Silicon. See https://openradar.appspot.com/radar?id=5583058442911744 .
Fixes GH-12814
Closes GH-13567
2024-05-28 15:25:46 +02:00
Ilija Tovilo
8a7d79da90
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Temporary reset filename and lineno override before autoload
2024-04-22 10:58:02 +02:00
Ilija Tovilo
5899cabff0
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Temporary reset filename and lineno override before autoload
2024-04-22 10:57:47 +02:00
SATO Kentaro
f8b9030b4e
Temporary reset filename and lineno override before autoload
...
Closes GH-10232
Closes GH-13313
2024-04-22 10:56:45 +02:00
Arnaud Le Blanc
af5db45dc9
Merge branch 'PHP-8.3'
...
* PHP-8.3:
[ci skip] NEWS
[ci skip] NEWS
fix: zend-max-execution-timers with negative or high timeout value (#13942 )
Use return value of getpwuid_r(), not errno (#13969 )
2024-04-16 14:20:23 +02:00
Arnaud Le Blanc
c12fd0873b
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
[ci skip] NEWS
fix: zend-max-execution-timers with negative or high timeout value (#13942 )
Use return value of getpwuid_r(), not errno (#13969 )
2024-04-16 14:19:35 +02:00
Kévin Dunglas
f6e8145b47
fix: zend-max-execution-timers with negative or high timeout value ( #13942 )
...
Align the behavior of zend-max-execution-timers with other timeout impls: Negative or very high timeout values are equivalent to no timeout
2024-04-16 14:13:36 +02:00
Ilija Tovilo
6db06a7c0f
Fix class name in warning of frameless calls ( #13619 )
2024-03-07 20:11:27 +01:00
Ilija Tovilo
631bc81607
Implement stackless internal function calls
...
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
Closes GH-12461
2024-02-06 17:42:28 +01:00
Ilija Tovilo
692cea5cbc
Use zend_error_noreturn for E_ERROR consistently
...
To be clear, these already don't return. zend_error_noreturn just hints at this
fact through the ZEND_NORETURN attribute.
Closes GH-12204
2023-09-14 11:44:55 +02:00
Ilija Tovilo
ae431bbfeb
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix use-of-uninitialized-value in start_fake_frame
2023-08-03 09:50:32 +02:00
Ilija Tovilo
4db025bd86
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix use-of-uninitialized-value in start_fake_frame
2023-08-03 09:50:20 +02:00
Ilija Tovilo
ed27d70d9a
Fix use-of-uninitialized-value in start_fake_frame
...
Closes GH-11732
2023-08-03 09:49:51 +02:00
Ilija Tovilo
1a0ef2c1cc
Revert "Remove name field from the zend_constant struct ( #10954 )"
...
This reverts commit f42992f580
.
Closes GH-11604
2023-07-17 22:32:41 +02:00
Ilija Tovilo
11aee73572
Fix incorrect handling of unwind and graceful exit exceptions
...
These exceptions should not invoke the user error handler, and not cause bailing
of the request.
Fixes GH-11601
Closes GH-11608
2023-07-07 08:15:17 +02:00
Ilija Tovilo
ad1b70d67e
Revert "Revert "Remove name field from the zend_constant struct ( #10954 )""
...
This reverts commit 9f4bd3040d
.
2023-07-04 16:42:40 +02:00
Máté Kocsis
9f4bd3040d
Revert "Remove name field from the zend_constant struct ( #10954 )"
...
This reverts commit f42992f580
.
Fix GH-11423
2023-07-03 15:16:24 +02:00
Ilija Tovilo
b3e33be443
Forward shutdown exceptions to user error handlers
...
Fixes GH-10695
Closes GH-110905
2023-06-15 17:11:22 +02:00
Máté Kocsis
f42992f580
Remove name field from the zend_constant struct ( #10954 )
...
As global constant names are case-sensitive now, we don't have to store them separately above the constant table.
2023-04-03 22:13:47 +02:00
Ilija Tovilo
9d5f2f1343
Use new ZSTR_INIT_LITERAL macro ( #10879 )
2023-03-20 16:19:05 +01:00
Ilija Tovilo
9944f58d3f
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix GH-10709: UAF in recursive AST evaluation
2023-03-06 15:03:19 +01:00
Ilija Tovilo
1978a7b393
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix GH-10709: UAF in recursive AST evaluation
2023-03-06 14:58:25 +01:00
Ilija Tovilo
7202fe16b7
Fix GH-10709: UAF in recursive AST evaluation
...
Fixes https://oss-fuzz.com/testcase-detail/6445949468934144
Closes GH-10718
2023-03-06 14:55:34 +01:00
Arnaud Le Blanc
0c7fc351ea
Merge branch 'PHP-8.2'
...
* PHP-8.2:
[ci skip] NEWS
[ci skip] NEWS
fix: support for timeouts with ZTS on Linux (#10141 )
2023-03-03 11:56:34 +01:00
Arnaud Le Blanc
37030257b8
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[ci skip] NEWS
fix: support for timeouts with ZTS on Linux (#10141 )
2023-03-03 11:45:50 +01:00
Kévin Dunglas
ad85e71421
fix: support for timeouts with ZTS on Linux ( #10141 )
2023-03-03 11:35:06 +01:00
Niels Dossche
9108a32bfe
Minor cleanups in Zend execution APIs ( #10699 )
...
* Remove always-false check in zend_lookup_class_ex()
This check is always false because of the undefined behaviour rule that
says a NULL pointer must never be dereferenced: we already dereference name
when checking the cache slot, before the NULL check. So the NULL may be
optimised away by the compiler. It looks like the code isn't even
supposed to work with name being NULL, so just remove the check.
* Remove always-true check in zend_fetch_static_property_address_ex()
* Simplify always-true conditions
2023-02-26 14:15:04 +00:00
Max Kellermann
413844d626
Zend/zend_types.h: deprecate zend_bool, zend_intptr_t, zend_uintptr_t ( #10597 )
...
These types are standard C99.
For compatibility with out-of-tree extensions, keep the typedefs
in main/php.h.
2023-02-18 19:31:28 +00:00
Christoph M. Becker
c8955c078a
Revert GH-10220
...
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816 >.
This reverts commit ecc880f491
.
This reverts commit 588a07f737
.
This reverts commit f377e15751
.
This reverts commit b4ba16fe18
.
This reverts commit 694ec1deea
.
This reverts commit 6b34de8eba
.
This reverts commit aa1cd02a43
.
This reverts commit 308fd311ea
.
This reverts commit 16203b53e1
.
This reverts commit 738fb5ca54
.
This reverts commit 9fdbefacd3
.
This reverts commit cd4a7c1d90
.
This reverts commit 928685eba2
.
This reverts commit 01e5ffc85c
.
2023-01-16 12:27:33 +01:00
Max Kellermann
ecc880f491
Zend/zend_execute: include cleanup
2023-01-10 14:19:03 +00:00
Arnaud Le Blanc
a11c8a3039
Limit stack size ( #9104 )
2022-12-16 17:44:26 +01:00
Christoph M. Becker
6109b80926
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fallback to first line of function when ex->opline is NULL (#10003 )
2022-12-05 12:45:49 +01:00
Christoph M. Becker
b683a7e470
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fallback to first line of function when ex->opline is NULL (#10003 )
2022-12-05 12:45:22 +01:00
Arnaud Le Blanc
adc23828b4
Fallback to first line of function when ex->opline is NULL ( #10003 )
...
ex->opline can be null due to missing SAVE_OPLINE() in the VM
Fixes GH-9933
2022-12-02 17:21:30 +01:00