Christoph M. Becker
38ecfe0245
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79532 : sizeof off_t can be wrong
2020-04-29 10:43:35 +02:00
Christoph M. Becker
67f9b0b754
Fix #79532 : sizeof off_t can be wrong
...
We have to actually determine the proper `SIZEOF_OFF_T`.
Interestingly, it is `4` on Windows x64.
We also have to prevent the redefinition in pg_config.h. The clean
solution would likely be to not include pg_config.h at all, but that's
out of scope for BC reasons for now.
2020-04-29 10:40:59 +02:00
Nikita Popov
7d1c806491
Clarify that FFI::cdef() does not return NULL
2020-04-28 14:46:04 +02:00
Máté Kocsis
6111d64cda
Improve a last couple of argument error messages
...
Closes GH-5404
2020-04-20 13:09:00 +02:00
Nikita Popov
e15409b43c
Adjust zend_write_func signature
...
Make it return size_t instead of int, to line up with actual
implementation.
2020-04-15 11:01:12 +02:00
Dmitry Stogov
ed1ad33ba4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79472 : ext/ffi/tests/040.phpt TC fails on Big endian arch
2020-04-14 20:38:42 +03:00
Christoph M. Becker
8c5faf7ad1
Fix #79472 : ext/ffi/tests/040.phpt TC fails on Big endian arch
...
For now we are choosing the simplest solution, namely to skip the test
on big-endian architectures.
2020-04-14 20:31:31 +03:00
Nikita Popov
4fb705a03d
Add zend_string_concat2 API
2020-04-14 17:18:05 +02:00
Máté Kocsis
c6485535c2
Generate method entries from stubs for curl, ffi, pdo, phar
...
Closes GH-5375
2020-04-14 11:49:02 +02:00
Máté Kocsis
ca006e54e3
Add missing visibility modifiers in stubs
2020-04-11 10:23:51 +02:00
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
...
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com >
2020-04-08 18:37:51 +02:00
Nikita Popov
8fd7f02ea4
Make cast_object handler required
...
Avoid subtle differences in behavior depending on whether the
handler is absent or returns FAILURE.
If you previously set cast_object to NULL, create a handler that
always returns FAILURE instead.
2020-03-31 14:37:49 +02:00
George Peter Banyard
6e88f19346
Explicitly declare the char as signed in zend_ffi_val.
...
This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.
2020-03-26 10:28:38 +03:00
George Peter Banyard
69b7d011d8
Explicitly declare the char as signed in zend_ffi_val.
...
This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.
2020-03-26 10:22:34 +03:00
Christoph M. Becker
ddf38fd764
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Improve FFI test suite for Windows
2020-03-18 17:01:30 +01:00
Christoph M. Becker
280485adc1
Improve FFI test suite for Windows
...
We add Windows support to four existing test cases, extract some useful
utility functions, and use them to simplify further test cases.
We also remove the Windows specific code from preload.inc, since
preloading isn't supported on Windows anyway.
2020-03-18 16:53:06 +01:00
Dmitry Stogov
10726588b1
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Export FFI::__BIGGEST_ALIGNMENT__
2020-03-12 11:45:05 +03:00
Dmitry Stogov
fee614f66b
Export FFI::__BIGGEST_ALIGNMENT__
2020-03-12 11:43:01 +03:00
Dmitry Stogov
c774ca8d80
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Allow to fetch function address
2020-03-12 11:41:12 +03:00
Dmitry Stogov
ecdaf83f5f
Allow to fetch function address
2020-03-12 11:40:48 +03:00
Xinchen Hui
583c7a4cbb
Merge branch 'PHP-7.4'
2020-03-12 15:45:07 +08:00
Xinchen Hui
22c83454d6
Folder mark missed
2020-03-12 15:43:15 +08:00
Dmitry Stogov
c45552e32b
Export FFI::__BIGGEST_ALIGNMENT__
2020-03-11 15:29:58 +03:00
Dmitry Stogov
e902e4acd9
Allow to fetch function address
2020-03-11 15:13:27 +03:00
Máté Kocsis
960318ed95
Change argument error message format
...
Closes GH-5211
2020-02-26 15:00:08 +01:00
Nikita Popov
abfdfc9ff8
Add return types to FFI methods
...
The FFI class is final, so we can use proper return types.
2020-02-18 10:28:43 +01:00
Máté Kocsis
ac0853eb26
Make type error messages more consistent
...
Closes GH-5092
2020-02-17 14:22:17 +01:00
Dmitry Stogov
53fc8ef41d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Disable instantiation of zero size FFI\CData objects
Fix # 79171: heap-buffer-overflow in phar_extract_file
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
2020-02-17 12:54:11 +03:00
Dmitry Stogov
54ecf57fe2
Disable instantiation of zero size FFI\CData objects
2020-02-17 12:48:55 +03:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +01:00
Nikita Popov
169805777c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Apply tidy formatting
2020-02-03 13:42:08 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
...
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Christoph M. Becker
127d6f3f39
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #79096 : FFI Struct Segfault
2020-01-14 16:47:24 +01:00
Christoph M. Becker
05f3cd23ed
Fix #79096 : FFI Struct Segfault
...
We must not assume that the size of a function's return value is at
most `sizeof(ffi_arg)`, but rather have to use the size which already
has been determined for the return type if it is larger than
`sizeof(ffi_arg)`.
To be able to have a regression test, we export the required test
function from the zend-test extension, and make sure that the test
can be run on different platforms regardless of whether zend-tests was
built statically or dynamically.
2020-01-14 16:46:58 +01:00
Nikita Popov
9b6c0bdcd6
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove support for preloading on Windows
2020-01-06 22:42:31 +01:00
Nikita Popov
59c3ddab13
Remove support for preloading on Windows
...
Due to ASLR restrictions, preloading on Windows does not work with
any code that has preloading dependencies on internal classes.
This effectively makes it unusable for any non-trivial codebase.
Instead of pretending like preloading is going to work, only to
make people realize that it really doesn't once they get beyond
a dummy example, we disable support for preloading on Windows
entirely.
Closes GH-4999.
2020-01-06 22:41:55 +01:00
Máté Kocsis
aadd3aaed9
Use RETURN_THROWS() in various places
2020-01-03 21:10:24 +01:00
Máté Kocsis
349a286461
Use RETURN_THROWS() after zend_throw_error()
2020-01-01 16:42:30 +01:00
Christoph M. Becker
3fafa19777
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Skip test for clang builds
2019-12-27 15:11:51 +01:00
Christoph M. Becker
58cc66e175
Skip test for clang builds
...
On Windows, clang builds don't use __vectorcall, so executing this test
does not make sense.
2019-12-27 15:09:19 +01:00
Christoph M. Becker
2804ea6127
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix test case for Windows
2019-11-11 12:56:55 +01:00
Christoph M. Becker
ce047e6091
Fix test case for Windows
2019-11-11 12:49:32 +01:00
Dmitry Stogov
6e9dd13d63
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78714 (funcs returning pointer can't use call convention spec)
2019-11-11 12:09:47 +03:00
Dmitry Stogov
ecd0c5b6ad
Fixed bug #78714 (funcs returning pointer can't use call convention spec)
2019-11-11 12:07:48 +03:00
Christoph M. Becker
fe13066403
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78761 : Zend memory heap corruption with preload and casting
2019-10-30 19:50:22 +01:00
Christoph M. Becker
0055f1e3dc
Fix #78761 : Zend memory heap corruption with preload and casting
...
We have to reset `FFI_G(persistent)` back to zero when preloading has
finished.
2019-10-30 19:49:39 +01:00
Christoph M. Becker
9b817264eb
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78762 : Failing FFI::cast() may leak memory
2019-10-30 17:22:56 +01:00
Christoph M. Becker
1e2d3d58a8
Fix #78762 : Failing FFI::cast() may leak memory
...
We have to release objects when we're done with them.
2019-10-30 17:21:58 +01:00
Christoph M. Becker
22523958f4
Skip test case on non Windows platforms
2019-10-29 10:05:31 +01:00
Christoph M. Becker
657f7e898d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Skip test case on non Windows platforms
2019-10-29 09:57:27 +01:00