Ilija Tovilo
ddc0b490f7
Allow arbitrary const expressions in backed enums
...
Closes GH-7821
Closes GH-8190
Closes GH-8418
2022-06-12 22:56:05 +02:00
George Peter Banyard
b40ae80804
Convert iterable into an internal alias for Traversable|array ( #7309 )
...
This does a compile time transformation of ``iterable`` into ``Traversable|array`` which simplifies some of the LSP variance handling.
The arginfo generation script from stubs is updated to produce a union type when it encounters the type ``iterable``
Extension functions which do not regenerate the arginfo, or write them manually are still supported by mimicking the compile time transformation while registering the function.
Type Reflection is preserved for single ``iterable`` (and ``?iterable``) to produce a ReflectionNamedType with name ``iterable``, however usage of ``iterable`` in union types will be converted to ``array|Traversable``
2022-06-07 13:35:34 +01:00
Ilija Tovilo
3f557ebd77
Revert "JIT: Add IBT support ( #8636 )"
...
This reverts commit c1fcd45eeb .
Closes GH-8711
2022-06-06 11:59:26 +02:00
Dmitry Stogov
faf3410957
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference
2022-06-06 11:14:33 +03:00
Dmitry Stogov
b86c6245cc
Fix type inference
...
This fixes oss-fuzz #47777
2022-06-06 11:13:53 +03:00
Levi Morrison
280fd680c8
Make vm_interrupt and timed_out atomic ( #8327 )
...
This is done by adding a new zend_atomic_bool type. The type
definition is only available for compiler alignment and size info; it
should be treated as opaque and only the zend_atomic_bool_* family of
functions should be used.
Note that directly using atomic_bool is complicated. All C++ compilers
stdlibs that I checked typedef atomic_bool to std::atomic<bool>, which
can't be used in an extern "C" section, and there's at least one usage
of this in core, and probably more outside of it.
So, instead use platform specific functions, preferring compiler
intrinsics.
2022-06-01 09:43:25 -06:00
Chen, Hu
c1fcd45eeb
JIT: Add IBT support ( #8636 )
...
Indirect Branch Tracking (IBT) is part of Intel's Control-Flow
Enforcement Technology (CET). IBT is hardware based, forward edge
Control-Flow-Integrity mechanism where any indirect CALL/JMP must target
an ENDBR instruction or suffer #CP.
This commit adds IBT support for JIT:
1. Add endbr32/64 instruction in Dynasm.
2. Insert endbr32/64 in indirect branch target for jitted code.
gcc support CET since v8.1 and set it to default since gcc 11. With this
commit, endbr is inserted in jitted code if PHP is compiled with "gcc
-fcf-protection=full/branch".
Signed-off-by: Chen, Hu <hu1.chen@intel.com >
2022-05-31 09:29:40 +03:00
Dmitry Stogov
e2e2d29973
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix memory leak
2022-05-30 11:39:24 +03:00
Dmitry Stogov
7ebda198ea
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-05-30 11:39:10 +03:00
Dmitry Stogov
3a8912fb7c
Fix memory leak
...
This fixes oss-fuzz #47648
2022-05-30 11:32:17 +03:00
Máté Kocsis
21fe72757c
Declare DatePeriod properties ( #8534 )
2022-05-28 08:43:10 +02:00
Arnaud Le Blanc
2f78af397c
Merge branch 'PHP-8.1'
...
* PHP-8.1:
[ci skip] NEWS
Add JIT guards for INIT_METHOD_CALL when the method may be modified (#8600 )
2022-05-27 13:19:31 +02:00
Arnaud Le Blanc
69d263e2a1
Add JIT guards for INIT_METHOD_CALL when the method may be modified ( #8600 )
...
Non-polymorphic methods can be modified from one request to an other due to recompilation or conditional declaration.
Fixes GH-8591
Co-authored-by: Oleg Stepanischev <Oleg.Stepanischev@tatar.ru >
2022-05-27 13:15:15 +02:00
Christoph M. Becker
06c3f9b043
Use proper cast
...
Casting to `void**` silences the compiler, but only works because that
is dereferenced to a generic `void*`.
2022-05-24 14:52:32 +02:00
Michael Voříšek
fb1c7eff04
Fix some level 1 MSVC compiler warnings on x86
...
See GH-8479.
2022-05-24 13:05:16 +02:00
Dmitry Stogov
f135ed9a8a
Fix memory leak
...
This fixes oss-fuzz #47527
2022-05-23 13:33:20 +03:00
Ilija Tovilo
85d41da32a
Merge branch 'PHP-8.1'
...
* PHP-8.1:
[skip ci] Add NEWS entry
Fix undefined behavior in php_set_inet6_addr
Reduce the scope of XFAIL (#8592 )
2022-05-22 23:29:53 +02:00
Ilija Tovilo
7a2747ba78
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix undefined behavior in php_set_inet6_addr
Reduce the scope of XFAIL (#8592 )
2022-05-22 23:27:47 +02:00
Arnaud Le Blanc
c12141c860
Reduce the scope of XFAIL ( #8592 )
2022-05-20 19:11:00 +02:00
Arnaud Le Blanc
c88dc44a75
Revert "XFAIL tests (GH-8588)"
...
This reverts commit f2ac4f206a .
2022-05-20 13:38:44 +02:00
Arnaud Le Blanc
6465f3ed13
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
XFAIL tests (GH-8588)
Stop closing stderr and stdout streams (#8569 )
2022-05-20 13:36:22 +02:00
Arnaud Le Blanc
f2ac4f206a
XFAIL tests (GH-8588)
2022-05-20 13:27:24 +02:00
Dmitry Stogov
462d00f548
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix memory leak
2022-05-16 13:48:51 +03:00
Dmitry Stogov
c430116a11
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix memory leak
2022-05-16 13:48:40 +03:00
Dmitry Stogov
84ea0aa684
Fix memory leak
...
This fixes oss-fuzz #47448
2022-05-16 13:45:31 +03:00
Dmitry Stogov
adc8155119
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference
2022-05-16 12:42:14 +03:00
Dmitry Stogov
aad5fbac85
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-05-16 12:42:04 +03:00
Dmitry Stogov
05375602a7
Fix type inference
...
This fixes oss-fuzz #47422
2022-05-16 12:41:25 +03:00
George Peter Banyard
926407f224
Fix some MSAN complaints under Clang ( #8553 )
2022-05-13 23:30:20 +01:00
Arnaud Le Blanc
298c1ab92e
Merge branch 'PHP-8.1'
2022-05-13 12:48:51 +02:00
Arnaud Le Blanc
33b8ef9958
Do not optimize out ini_get() when the entry does not exist during compilation ( #8507 )
...
The entry may exist later if dl is enabled
Fixes GH-8466
2022-05-13 12:39:29 +02:00
Arnaud Le Blanc
332bd03782
Do not optimize out ini_get() when the entry does not exist during compilation ( #8507 )
...
The entry may exist later if dl is enabled
Fixes GH-8466
2022-05-13 12:35:00 +02:00
Dmitry Stogov
f9483708c7
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Add JIT guards for INIT_FCALL instructions and functions that may be modified
2022-05-12 18:46:12 +03:00
Dmitry Stogov
6c25413183
Add JIT guards for INIT_FCALL instructions and functions that may be modified
...
For methods we reuse mechanism of polymorphic calls.
For regular function we invalidate the whole root trace.
This fixes https://github.com/php/php-src/issues/8461
2022-05-12 18:44:12 +03:00
Max Kellermann
c732549200
ext/opcache/ZendAccelerator: fix accel_deactivate_now() prototype ( #8541 )
...
Fixes -Wstrict-prototypes warning introduced by commit 04a4864b65
2022-05-12 13:19:30 +02:00
Dmitry Stogov
89fa77516c
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference
2022-05-11 12:40:16 +03:00
Dmitry Stogov
84c1e99ecf
Fix type inference
...
This fizes oss-fuzz #47044
2022-05-11 12:39:26 +03:00
Dmitry Stogov
2495459e50
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference
2022-05-11 12:10:00 +03:00
Dmitry Stogov
f1fc58ed8d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference
2022-05-11 12:09:53 +03:00
Dmitry Stogov
3f1e1b9ddf
Fix type inference
...
This fixes oss-fuzz #47049
2022-05-11 12:09:11 +03:00
Ilija Tovilo
9a90bd7054
Deprecate ${} string interpolation
...
https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation
2022-05-05 10:14:56 +02:00
Dmitry Stogov
45d7695b5d
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed tests
2022-04-26 08:32:50 +03:00
Dmitry Stogov
e9d65c8e2b
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed tests
2022-04-26 08:32:28 +03:00
Dmitry Stogov
3564eaff42
Fixed tests
2022-04-26 08:31:42 +03:00
Dmitry Stogov
27efd125ed
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix ISSET_ISEMPTY_VAR missoptimization
2022-04-25 13:31:40 +03:00
Dmitry Stogov
948ef10dd0
Fix ISSET_ISEMPTY_VAR missoptimization
...
This fixes oss-fuzz #46909
2022-04-25 13:31:01 +03:00
Dmitry Stogov
73514d6e4f
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Reorder optimization passes to avoid miss-optimization
2022-04-25 13:12:03 +03:00
Dmitry Stogov
1aa5e9392d
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Reorder optimization passes to avoid miss-optimization
2022-04-25 13:09:31 +03:00
Dmitry Stogov
3b735456c6
Reorder optimization passes to avoid miss-optimization
2022-04-25 13:09:05 +03:00
Dmitry Stogov
992c8061b4
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference
2022-04-25 12:17:17 +03:00