Niels Dossche
99a14b805e
Fix GH-16013 and bug #80857 : Big endian issues
...
The FFI call return values follow widening rules.
We must widen to `ffi_arg` in the case we're handling a return value for types shorter than the machine width.
From http://www.chiark.greenend.org.uk/doc/libffi-dev/html/The-Closure-API.html :
> In most cases, ret points to an object of exactly the size of the type specified when cif was constructed.
> However, integral types narrower than the system register size are widened.
> In these cases your program may assume that ret points to an ffi_arg object.
If we don't do this, we get wrong values when reading the return values.
Closes GH-17255.
Co-authored-by: Dmitry Stogov <dmitry@zend.com >
2024-12-25 21:33:14 +01:00
..
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2023-07-18 12:59:21 +02:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2022-11-03 14:40:35 +01:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2023-11-22 21:25:15 +03:00
2022-09-26 23:15:38 +02:00
2023-07-18 12:59:21 +02:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2023-07-18 12:59:21 +02:00
2021-07-13 09:22:31 +02:00
2021-07-13 09:22:31 +02:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2019-10-30 19:49:39 +01:00
2019-10-30 19:49:39 +01:00
2023-07-18 12:59:21 +02:00
2023-07-18 12:59:21 +02:00
2024-12-09 22:29:02 +01:00
2024-12-09 22:29:02 +01:00
2024-12-09 22:29:02 +01:00
2021-04-01 12:08:24 +01:00
2021-04-01 12:08:24 +01:00
2023-07-18 12:59:21 +02:00
2021-04-01 12:08:24 +01:00
2023-04-03 08:02:19 +02:00
2023-07-18 12:59:21 +02:00
2021-04-01 12:08:24 +01:00
2021-08-18 17:16:54 +02:00
2022-07-27 10:42:25 +02:00
2021-04-01 12:08:24 +01:00
2023-07-21 10:42:19 +02:00
2023-07-18 12:59:21 +02:00
2022-11-28 16:19:54 +01:00
2022-11-28 16:19:54 +01:00
2023-07-18 12:59:21 +02:00
2022-04-24 18:04:37 +02:00
2023-07-18 12:59:21 +02:00
2023-12-15 14:11:56 +00:00
2023-01-24 09:15:03 +03:00
2023-02-13 22:42:39 +03:00
2023-08-29 17:01:10 +02:00
2023-08-29 17:01:10 +02:00
2024-04-02 18:11:02 +02:00
2024-05-14 19:49:22 +02:00
2024-05-14 19:49:22 +02:00
2024-07-22 17:44:47 +02:00
2024-07-22 17:44:47 +02:00
2024-06-25 15:14:00 +02:00
2024-12-25 21:33:14 +01:00
2024-10-14 19:23:04 +02:00
2021-04-01 12:08:24 +01:00
2022-09-26 23:15:38 +02:00
2020-03-18 16:53:06 +01:00
2023-03-27 22:59:00 +02:00
2020-03-18 16:53:06 +01:00
2023-10-28 14:59:06 +02:00
2023-10-28 16:28:43 +02:00
2023-10-28 16:28:43 +02:00
2023-10-28 16:28:43 +02:00