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

132 Commits

Author SHA1 Message Date
Gabriel Caruso
5d6e923d46 Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Christoph M. Becker
0c7124e6be Add check_only parameter to get_closure handler
`get_closure` handlers are called to check whether an object is
callable, and to actually get the closure, respectively.  The behavior
of the handler might differ for these two cases, particularly the
handler may throw in the latter case, but should not in the former.

Therefore we add a `check_only` parameter, to be able to distinguish
the desired purpose.
2019-09-24 16:08:42 +02:00
Christoph M. Becker
d6ef63db53 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78543: is_callable() on FFI\CData throws Exception
2019-09-19 09:17:53 +02:00
Christoph M. Becker
9dfbcd7248 Fix #78543: is_callable() on FFI\CData throws Exception
If `Z_OBJ_HANDLER_P(callable, get_closure)` throws, we must not let the
exeception pass to userland, if called through `is_callable()`.
2019-09-19 09:13:22 +02:00
Nikita Popov
2cafaab885 Merge branch 'PHP-7.4' 2019-09-17 13:15:01 +02:00
Nikita Popov
d266ba4f2d Check for exception after calling count_values()
To avoid a duplicate error if count_values() throws.
2019-09-17 13:13:44 +02:00
Dmitry Stogov
e5af673e45 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bad format string
2019-09-11 00:53:30 +03:00
Dmitry Stogov
5f555fb19e Fixed bad format string 2019-09-11 00:52:54 +03:00
Dmitry Stogov
0128f6eb84 Merge branch 'PHP-7.4'
* PHP-7.4:
  NEWS entry, test and minor cleanup for FFI::isNull()
  add FFI::isNull() to check whether a FFI\CData is a null pointer
2019-09-10 11:34:08 +03:00
Dmitry Stogov
21c3cdf668 NEWS entry, test and minor cleanup for FFI::isNull() 2019-09-10 11:23:12 +03:00
Philip Hofstetter
f6ff7eb335 add FFI::isNull() to check whether a FFI\CData is a null pointer 2019-09-10 11:03:51 +03:00
Dmitry Stogov
d40d0faa90 Merge branch 'PHP-7.4'
* PHP-7.4:
  Stop after exceptions
2019-09-10 11:02:03 +03:00
Dmitry Stogov
ea92b9b655 Stop after exceptions 2019-09-10 11:01:36 +03:00
Dmitry Stogov
1db0bad6a7 Fixed bug #78488 (OOB in ZEND_FUNCTION(ffi_trampoline)). 2019-09-04 12:16:12 +03:00
Dmitry Stogov
8a393ec886 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78488 (OOB in ZEND_FUNCTION(ffi_trampoline)).
2019-09-04 12:14:15 +03:00
Dmitry Stogov
d03d369fdb Fixed bug #78488 (OOB in ZEND_FUNCTION(ffi_trampoline)). 2019-09-04 12:13:49 +03:00
Nikita Popov
a98307df87 Make arginfo printing of prefer-ref arguments nicer 2019-08-26 15:39:39 +02:00
Christoph M. Becker
e047e9d893 Add ext/ffi stubs 2019-08-26 15:25:27 +02:00
Christoph M. Becker
85f253ae4f Merge branch 'PHP-7.4'
* PHP-7.4:
  Support calling convention specific function name mangling
2019-08-04 12:14:31 +02:00
Christoph M. Becker
1ed9ebdea5 Support calling convention specific function name mangling
On Windows certain calling conventions cause C function names to be
mangled, so to import them we have to use the properly mangled names.
2019-08-04 12:14:11 +02:00
Christoph M. Becker
1a3e3c8c26 Merge branch 'PHP-7.4'
* PHP-7.4:
  Document how to generate ffi_parser.c
2019-07-29 13:39:28 +02:00
Christoph M. Becker
07286d2fb4 Document how to generate ffi_parser.c 2019-07-29 13:38:53 +02:00
Peter Kokot
11e7c001df Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix typos in FFI
2019-07-19 23:07:34 +02:00
Peter Kokot
81fd1c5206 Fix typos in FFI
Closes GH-4438
2019-07-19 23:07:04 +02:00
Nikita Popov
a1479fbbd9 Merge branch 'PHP-7.4' 2019-06-25 14:30:24 +02:00
Nikita Popov
0f3ca15bb7 FFI: Perform bitfield operations byte-wise
Otherwise we may perform reads/writes outside the allocation, as
already happens in 032.phpt.
2019-06-25 14:28:58 +02:00
Nikita Popov
6aaab9adf7 Merge branch 'PHP-7.4' 2019-06-20 16:24:31 +02:00
Nikita Popov
f127d77eef FFI: Use signed arithmetic for pointer offset
offset can be negative here, using signed arithmetic avoids ubsan
warnings.
2019-06-20 16:22:26 +02:00
Dmitry Stogov
5dbcbab4cc Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove XFAIL mark
2019-06-17 14:56:42 +03:00
Dmitry Stogov
938d2359ae Remove XFAIL mark 2019-06-17 14:56:28 +03:00
Dmitry Stogov
cf50cab7bb Merge branch 'PHP-7.4'
* PHP-7.4:
  Avoid uninitilized field access
2019-06-17 14:54:28 +03:00
Dmitry Stogov
eda916cc98 Avoid uninitilized field access 2019-06-17 14:53:44 +03:00
Dmitry Stogov
3e0b09a83c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed memory leaks in ext/ffi/tests/100.phpt on Mac OSX
2019-06-17 14:40:48 +03:00
Dmitry Stogov
1e0b0467b6 Fixed memory leaks in ext/ffi/tests/100.phpt on Mac OSX 2019-06-17 14:40:19 +03:00
Joe Watkins
956db0cdc2 Merge branch 'PHP-7.4'
* PHP-7.4:
  fix mac tests on azure
2019-06-14 12:58:13 +02:00
Joe Watkins
f16b012116 fix mac tests on azure 2019-06-14 12:55:00 +02:00
Nikita Popov
b1e52cab62 Merge branch 'PHP-7.4' 2019-06-03 09:21:13 +02:00
Hugh McMaster
7ec50c24bb ext/ffi: Remove symbol check for ffi_open
Closes GH-4215.
2019-06-03 09:19:25 +02:00
Nikita Popov
45a0656e95 Remove get() object handler
Now that set() is gone, there is little point in keeping get(), as
it is essentially just a different way of writing cast_object()
now.

Closes GH-4202.
2019-05-29 17:15:19 +02:00
Nikita Popov
c7a67c6dce Disable JIT for ext/ffi/tests/200.phpt
JIT assumes that the zend_write callback will not be changed at
runtime, which I think is reasonable, so don't run this test
under JIT.
2019-05-29 12:11:32 +02:00
Dmitry Stogov
b2cdde0826 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
2019-05-28 20:19:15 +03:00
Dmitry Stogov
83804519df Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros 2019-05-28 20:10:02 +03:00
Dmitry Stogov
51ddc59d9f Merge branch 'PHP-7.4'
* PHP-7.4:
  Avoid usage of internal get/set object handlers. They are going to be removed in PHP-8. Scalar FFI values now should be accessed through special "cdata" property.
2019-05-28 17:14:28 +03:00
Dmitry Stogov
6738241aec Avoid usage of internal get/set object handlers. They are going to be removed in PHP-8.
Scalar FFI values now should be accessed through special "cdata" property.

    $x = FFI::new("int");
    $x = 42;

    should be changed into

    $x = FFI::new("int");
    $x->cdata = 42;
2019-05-28 17:08:35 +03:00
Joe Watkins
daa9172c10 Merge branch 'PHP-7.4'
* PHP-7.4:
  Define minimum required libffi version
2019-05-25 08:12:43 +02:00
Peter Kokot
e7a1409fe1 Define minimum required libffi version 2019-05-25 08:12:15 +02:00
Dmitry Stogov
d58cc9c9e5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed test on platforms that don't support fastcall calling convention
2019-05-14 00:22:21 +03:00
Dmitry Stogov
9b18afcbca Fixed test on platforms that don't support fastcall calling convention 2019-05-14 00:21:00 +03:00
Dmitry Stogov
6b691cd44e Merge branch 'PHP-7.4'
* PHP-7.4:
  Check for supported libffi ABI
2019-05-13 15:16:28 +03:00
Dmitry Stogov
49de3ce3ca Check for supported libffi ABI 2019-05-13 15:15:51 +03:00