summaryrefslogtreecommitdiff
path: root/ext/ffi/tests
Commit message (Collapse)AuthorAgeFilesLines
* XFAIL on WIN64 because of problem in libffiDmitry Stogov2021-03-191-0/+1
|
* Merge branch 'PHP-8.0'Dmitry Stogov2021-03-181-1/+10
|\ | | | | | | | | * PHP-8.0: Additional fix for bug #80847. On x86_64 part of structure may be passed in CPU registers.
| * Additional fix for bug #80847.Dmitry Stogov2021-03-181-1/+10
| | | | | | | | On x86_64 part of structure may be passed in CPU registers.
* | "zend-test" was renamed to "zend_test"Dmitry Stogov2021-03-181-1/+1
| |
* | Merge branch 'PHP-8.0'Dmitry Stogov2021-03-171-0/+58
|\ \ | |/ | | | | | | * PHP-8.0: Fixed bug #80847 (CData structs with fields of type struct can't be passed as C function argument)
| * Fixed bug #80847 (CData structs with fields of type struct can't be passed ↵Dmitry Stogov2021-03-171-0/+58
| | | | | | | | as C function argument)
* | Rename zend-test to zend_testNikita Popov2021-01-193-3/+3
|/ | | | | | | | | | | The extension name should match the name of the ext/ directory, otherwise it will not get picked up by run-tests. It would be possible to remap this in run-tests, but I think it's better to rename the extension to follow the standard format. Other extensions also use underscore instead of hyphen (e.g. pdo_mysql and not pdo-mysql). Of course, the ./configure option remains hyphenated. Closes GH-6613.
* Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-301-28/+23
|\ | | | | | | | | * PHP-7.4: Fix bug79177.phpt wrt. JIT
| * Fix bug79177.phpt wrt. JITChristoph M. Becker2020-10-301-28/+23
| | | | | | | | | | | | | | | | | | | | JIT ignores that the `zend_write` callback is overwritten, so we define our own callback and caller. We also fix the "inconsistent DLL binding" warnings on Windows, by introducing `PHP_ZEND_TEST_API`. Closes GH-6391.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-281-0/+47
|\ \ | |/ | | | | | | * PHP-7.4: Fix #79177: FFI doesn't handle well PHP exceptions within callback
| * Fix #79177: FFI doesn't handle well PHP exceptions within callbackChristoph M. Becker2020-10-281-0/+47
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-091-0/+15
|\ \ | |/ | | | | | | * PHP-7.4: Fixed bug #80186
| * Fixed bug #80186Nikita Popov2020-10-091-0/+15
| | | | | | | | | | Early exit in FE_RESET if get_properties() returns empty array, as we cannot add HT iterators to zend_empty_array.
* | Run tidyNikita Popov2020-09-187-14/+14
| | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | Add many missing closing PHP tags to testsMáté Kocsis2020-08-091-0/+1
| | | | | | | | Closes GH-5958
* | Review the usage of apostrophes in error messagesMáté Kocsis2020-07-109-17/+17
| | | | | | | | Closes GH-5590
* | Replace EXPECTF when possibleFabien Villepinte2020-06-291-1/+1
| | | | | | | | Closes GH-5779
* | Fix #79749: Converting FFI instances to bool failsChristoph M. Becker2020-06-291-0/+17
| | | | | | | | | | | | 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.
* | Add --file-cache-prime/use options to run-testsNikita Popov2020-05-201-0/+1
| | | | | | | | | | | | | | | | --file-cache-prime populates the file cache, --file-cache-use uses the file cache. And fix a number of tests to run under file cache or disabled timestamp validation.
* | Trim trailing whitespaces and fix code styleRod Elias2020-05-122-9/+9
| | | | | | | | Closes GH-5554.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-05-121-0/+3
|\ \ | |/ | | | | | | * PHP-7.4: Skip test on big-endian architectures
| * Skip test on big-endian architecturesChristoph M. Becker2020-05-121-0/+3
| | | | | | | | | | Due to the memory layout on BE architectures, the address would be `0x2a00000000` instead of `0x2a` on little-endian architectures.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-05-111-0/+28
|\ \ | |/ | | | | | | * PHP-7.4: Fix #79571: FFI: var_dumping unions may segfault
| * Fix #79571: FFI: var_dumping unions may segfaultChristoph M. Becker2020-05-111-0/+28
| | | | | | | | | | | | | | We must not attempt to access arbitrary union members when retrieving debug info, because that may not be valid. Therefore we do no longer dereference pointer types inside of unions, but report their address as string in `%p` format instead.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-04-291-0/+38
|\ \ | |/ | | | | | | * PHP-7.4: Fix #79532: sizeof off_t can be wrong
| * Fix #79532: sizeof off_t can be wrongChristoph M. Becker2020-04-291-0/+38
| | | | | | | | | | | | | | | | | | 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.
* | Adjust zend_write_func signatureNikita Popov2020-04-151-1/+1
| | | | | | | | | | Make it return size_t instead of int, to line up with actual implementation.
* | Merge branch 'PHP-7.4'Dmitry Stogov2020-04-141-1/+6
|\ \ | |/ | | | | | | * PHP-7.4: Fix #79472: ext/ffi/tests/040.phpt TC fails on Big endian arch
| * Fix #79472: ext/ffi/tests/040.phpt TC fails on Big endian archChristoph M. Becker2020-04-141-1/+6
| | | | | | | | | | For now we are choosing the simplest solution, namely to skip the test on big-endian architectures.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-1811-55/+67
|\ \ | |/ | | | | | | * PHP-7.4: Improve FFI test suite for Windows
| * Improve FFI test suite for WindowsChristoph M. Becker2020-03-1811-52/+64
| | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4'Dmitry Stogov2020-03-121-2/+2
|\ \ | |/ | | | | | | * PHP-7.4: Export FFI::__BIGGEST_ALIGNMENT__
| * Export FFI::__BIGGEST_ALIGNMENT__Dmitry Stogov2020-03-121-2/+2
| |\
| | * Export FFI::__BIGGEST_ALIGNMENT__Dmitry Stogov2020-03-111-2/+2
| | |
* | | Merge branch 'PHP-7.4'Dmitry Stogov2020-03-121-0/+59
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Allow to fetch function address
| * | Allow to fetch function addressDmitry Stogov2020-03-111-0/+59
| |/
* | Change argument error message formatMáté Kocsis2020-02-261-1/+1
| | | | | | | | Closes GH-5211
* | Make type error messages more consistentMáté Kocsis2020-02-171-1/+1
| | | | | | | | Closes GH-5092
* | Merge branch 'PHP-7.4'Dmitry Stogov2020-02-173-4/+8
|\ \ | |/ | | | | | | | | | | | | * 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
| * Disable instantiation of zero size FFI\CData objectsDmitry Stogov2020-02-173-4/+8
| |
* | Reindent phpt filesNikita Popov2020-02-0337-489/+489
| |
* | Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-178-16/+16
| | | | | | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-141-0/+39
|\ \ | |/ | | | | | | * PHP-7.4: Fix #79096: FFI Struct Segfault
| * Fix #79096: FFI Struct SegfaultChristoph M. Becker2020-01-141-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4'Nikita Popov2020-01-062-25/+4
|\ \ | |/ | | | | | | * PHP-7.4: Remove support for preloading on Windows
| * Remove support for preloading on WindowsNikita Popov2020-01-062-25/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4'Christoph M. Becker2019-12-271-0/+5
|\ \ | |/ | | | | | | * PHP-7.4: Skip test for clang builds
| * Skip test for clang buildsChristoph M. Becker2019-12-271-0/+5
| | | | | | | | | | On Windows, clang builds don't use __vectorcall, so executing this test does not make sense.
* | Merge branch 'PHP-7.4'Christoph M. Becker2019-11-111-1/+7
|\ \ | |/ | | | | | | * PHP-7.4: Fix test case for Windows
| * Fix test case for WindowsChristoph M. Becker2019-11-111-1/+7
| |