#
2397e768 |
| 24-Apr-2022 |
Bob Weinand |
Fix GH-8433: Assigning function pointers to structs in FFI leaks memory
|
#
703cac33 |
| 10-Jan-2022 |
Christoph M. Becker |
Fix GH-7867: FFI::cast() from pointer to array is broken Casting from pointer to array is special, so we must not fall back to the general FFI casting. There is a particular issue regar
Fix GH-7867: FFI::cast() from pointer to array is broken Casting from pointer to array is special, so we must not fall back to the general FFI casting. There is a particular issue regarding the size comparison, namely that the pointer size is always 8 for 64bit architectures, but the size of an array is determined by its declaration, so as is casting a pointer to an array with more than 8 elements would fail, but casting to an array with less than 9 elements succeeds, but the internal pointer would point to some arbitrary memory. We fix this by properly supporting the cast. An alternative would be to deny this kind of cast generally, since it is not necessarily safe. However, FFI isn't necessarily safe anyway. We also check pointer/array type compatibility when casting. Co-authored-by: Dmitry Stogov <dmitry@zend.com> Closes GH-7876.
show more ...
|
#
465cfc49 |
| 18-Mar-2021 |
Dmitry Stogov |
Additional fix for bug #80847. On x86_64 part of structure may be passed in CPU registers.
|
#
38ebb55c |
| 17-Mar-2021 |
Dmitry Stogov |
Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument)
|
#
c1d76617 |
| 24-Dec-2020 |
Máté Kocsis |
Add a few other RETURN_THROWS()
|
#
ed19cb65 |
| 23-Dec-2020 |
Máté Kocsis |
Fix the signature of FFI::sizeof() and FFI::alignof()
|
Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1 |
|
#
f547412c |
| 28-Oct-2020 |
Christoph M. Becker |
Fix #79177: FFI doesn't handle well PHP exceptions within callback We have to error on unhandled exceptions in FFI callbacks, to avoid passing back undefined values. This has be
Fix #79177: FFI doesn't handle well PHP exceptions within callback We have to error on unhandled exceptions in FFI callbacks, to avoid passing back undefined values. This has been discussed and agreed upon in a previous PR[1]. [1] <https://github.com/php/php-src/pull/5120> Closes GH-6366.
show more ...
|
Revision tags: php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1 |
|
#
c96d884d |
| 07-Oct-2020 |
Nikita Popov |
Avoid namespaced class symbol clashes in gen_stub Add the namespace prefix (using underscores) to both the arginfo name and the method declaration name.
|
#
58309384 |
| 30-Sep-2020 |
Dmitry Stogov |
Fixed hex char parsing
|
#
a1cee97d |
| 30-Sep-2020 |
George Peter Banyard |
Fixed incorrect logical conditions
|
Revision tags: php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1 |
|
#
c98d4769 |
| 10-Sep-2020 |
Máté Kocsis |
Consolidate new union type ZPP macro names They will now follow the canonical order of types. Older macros are left intact due to maintaining BC. Closes GH-6112
|
#
bea44429 |
| 10-Sep-2020 |
chopins |
Added FFI\CType::getName() method
|
Revision tags: php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1 |
|
#
f7fbc633 |
| 14-Aug-2020 |
Máté Kocsis |
Add more precise type info for stubs Closes GH-6005
|
#
2803c8fb |
| 07-Aug-2020 |
Máté Kocsis |
Add all the missing parameter types to stubs Closes GH-5955
|
Revision tags: php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17 |
|
#
d92229d8 |
| 06-Apr-2020 |
Nikita Popov |
Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument nam
Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument name. For now, it is looked up by linear scan and runtime cached. * This may leave UNDEF arguments on the stack. To avoid having to deal with them in other places, a CHECK_UNDEF_ARGS opcode is used to either replace them with defaults, or error. * For variadic functions, EX(extra_named_params) are collected and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS. RFC: https://wiki.php.net/rfc/named_params Closes GH-5357.
show more ...
|
#
f06a6b46 |
| 11-Jul-2020 |
Chuck Adams |
(ffi) fix ifdefs for non-windows systems without long double Closes GH-5840
|
#
d30cd7d7 |
| 26-May-2020 |
Máté Kocsis |
Review the usage of apostrophes in error messages Closes GH-5590
|
#
302933da |
| 07-Jul-2020 |
Nikita Popov |
Remove no_separation flag
|
#
2b5de6f8 |
| 01-Jul-2020 |
Max Semenik |
Remove proto comments from C files Closes GH-5758
|
#
312201dc |
| 01-Jul-2020 |
Nikita Popov |
Add get_gc handle for object iterators Optional handler with the same semantics as the object handler.
|
#
aca621cf |
| 29-Jun-2020 |
Christoph M. Becker |
Fix #79749: Converting FFI instances to bool fails Casting objects to bool is supposed to yield `true`. Since the `cast_object` handler is required now, we have to implement the `_I
Fix #79749: Converting FFI instances to bool fails Casting objects to bool is supposed to yield `true`. Since the `cast_object` handler is required now, we have to implement the `_IS_BOOL` conversion there.
show more ...
|
#
92c4b065 |
| 16-Jun-2020 |
Christoph M. Becker |
Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0) Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce `ZEND_UNREACHABLE()`, so that MSVC which does not consider `asser
Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0) Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce `ZEND_UNREACHABLE()`, so that MSVC which does not consider `assert(0)` to mark unreachable code does no longer trigger C4715[1] warnings in debug builds. This may be useful for other compilers as well. [1] <https://docs.microsoft.com/de-de/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4715?view=vs-2019>
show more ...
|
#
bb3d4456 |
| 15-Jun-2020 |
Dmitry Stogov |
Change GC_COLLECTABLE flag into GC_NOT_COLLECTABLE to simplify GC_MAY_LEAK() check
|
#
59656100 |
| 08-Jun-2020 |
Máté Kocsis |
Fix some UNKNOWN default values In ext/ffi, ext/intl, ext/mysqli, and ext/pcntl
|
#
83a77015 |
| 08-Jun-2020 |
twosee |
Add helper APIs for maybe-interned string creation Add ZVAL_CHAR/RETVAL_CHAR/RETURN_CHAR as a shortcut for using ZVAL_INTERNED_STRING and ZSTR_CHAR. Add zend_string_init_fast()
Add helper APIs for maybe-interned string creation Add ZVAL_CHAR/RETVAL_CHAR/RETURN_CHAR as a shortcut for using ZVAL_INTERNED_STRING and ZSTR_CHAR. Add zend_string_init_fast() as a helper for the empty string / one char interned string / zend_string_init() pattern. Also add corresponding ZVAL_STRINGL_FAST etc macros. Closes GH-5684.
show more ...
|