Peter Kokot
bee84c0468
Autotools: Quote PHP_SUBST arguments in extensions ( #14748 )
2024-07-02 06:56:18 +02:00
Arnaud Le Blanc
f7df238971
Merge branch 'PHP-8.3'
...
* PHP-8.3:
[ci skip] NEWS for GH-14626
[ci skip] NEWS for GH-14626
Fix is_zend_ptr() for huge blocks (#14626 )
2024-06-25 15:18:58 +02:00
Arnaud Le Blanc
bc57c77fa2
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
[ci skip] NEWS for GH-14626
Fix is_zend_ptr() for huge blocks (#14626 )
2024-06-25 15:15:46 +02:00
Arnaud Le Blanc
1ff277dee2
Fix is_zend_ptr() for huge blocks ( #14626 )
...
is_zend_ptr() expected zend_mm_heap.huge_list to be circular, but it's in fact NULL-terminated. It could crash when at least one huge block exists and the ptr did not belong to any block.
2024-06-25 15:14:00 +02:00
Peter Kokot
5e242fea66
Use AC_DEFINE_UNQUOTED where variables are present ( #14377 )
...
According to Autoconf docs and upstream code, AC_DEFINE_UNQUOTED must be
used where variables are present in the arguments.
Follow up of GH-13552
2024-05-30 21:50:46 +02:00
Gina Peter Banyard
554541c4db
ext/ffi: Fix [-Wenum-int-mismatch] compiler warning
2024-05-21 12:17:25 +01:00
Máté Kocsis
f093015a6c
Fix class constant and property ID generation for the manual ( #14249 )
...
Related to https://github.com/php/doc-en/pull/3367
2024-05-17 20:30:16 +02:00
Niels Dossche
889f308e01
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix GH-14215: Cannot use FFI::load on CRLF header file with apache2handler
2024-05-14 19:56:05 +02:00
Niels Dossche
0e98a05a3d
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-14215: Cannot use FFI::load on CRLF header file with apache2handler
2024-05-14 19:52:19 +02:00
Niels Dossche
ebd1a36670
Fix GH-14215: Cannot use FFI::load on CRLF header file with apache2handler
...
Some modules may reset _fmode, which causes mangling of line endings.
Always be explicit like we do in other places where the native open call
is used.
Closes GH-14218.
2024-05-14 19:49:22 +02:00
Niels Dossche
8aec95e23f
Fix build on Clang 18 ( #14136 )
...
Clang 18 only allows counted_by to work on real flexible array members,
not ones with a zero size. Otherwise you get errors like:
```
ext/opcache/jit/zend_jit_ir.c:149:12: error: 'counted_by' only applies to C99 flexible array members
```
2024-05-04 19:17:42 +02:00
Tim Düsterhus
08b2ab22f4
Include the source location in Closure names ( #13550 )
...
* Include the source location in Closure names
This change makes stack traces involving Closures, especially multiple
different Closures, much more useful, because it's more easily visible *which*
closure was called for a given stack frame.
The implementation is similar to that of anonymous classes which already
include the file name and line number within their generated classname.
* Update scripts/dev/bless_tests.php for closure naming
* Adjust existing tests for closure naming
* Adjust tests for closure naming that were not caught locally
* Drop the namespace from closure names
This is redundant with the included filename.
* Include filename and line number as separate keys in Closure debug info
* Fix test
* Fix test
* Include the surrounding class and function name in closure names
* Fix test
* Relax test expecations
* Fix tests after merge
* NEWS / UPGRADING
2024-04-12 18:21:13 +02:00
Bob Weinand
18496cc3d4
Merge branch 'PHP-8.3'
2024-04-02 18:13:10 +02:00
Bob Weinand
dbaeb62ab1
Merge branch 'PHP-8.2' of github.com:php/php-src into PHP-8.3
2024-04-02 18:11:55 +02:00
Bob Weinand
e7462bff19
Run one testsuite with observers enabled in CI ( #13869 )
...
Signed-off-by: Bob Weinand <bobwei9@hotmail.com >
2024-04-02 18:11:02 +02:00
Niels Dossche
b9a2533cb3
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix gcc-14 Wcalloc-transposed-args warnings
2024-04-01 20:34:44 +02:00
Niels Dossche
e34c86ce1a
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix gcc-14 Wcalloc-transposed-args warnings
2024-04-01 20:34:37 +02:00
Cristian Rodríguez
18d70db091
Fix gcc-14 Wcalloc-transposed-args warnings
...
gcc-14 and later warns of inverted arguments in calloc or
calloc-like __alloc_size__ annotated functions.
Closes GH-13818.
2024-04-01 20:34:14 +02:00
Peter Kokot
b5e2f3a4b6
Check FFI_* ABI with Autoconf AC_CHECK_DECL ( #13552 )
...
The FFI_* calling conventions are enum constants and AC_CHECK_DECL(S)
can be used to check for their existence in the ffi.h header. This
simplifes the checks and adds a simple AC_CHECK_DECL macro wrapper which
defines the HAVE_FFI_* belonging symbols.
2024-03-01 19:31:55 +01:00
Máté Kocsis
f2e199e878
Implement "support doc comments for internal classes and functions" ( #13266 )
...
Fixes #13130
2024-02-25 08:41:31 +01:00
Máté Kocsis
10957e498c
Do not generate frameless info items when func info generation is disabled
...
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
Peter Kokot
e3f118e351
Fix typo in FFI 77706 test title
...
This test is for the bug 77706 (Improve error messages in FFI for
incompatible arguments).
[skip ci]
2024-01-17 08:11:23 +01:00
David CARLIER
9726721560
general signatures discrepencies fixes ( #13122 )
2024-01-10 22:19:23 +00:00
Cristian Rodríguez
927adfb1a6
Use a single version of mempcpy(3) ( #12257 )
...
While __php_mempcpy is only used by ext/standard/crypt_sha*, the
mempcpy "pattern" is used everywhere.
This commit removes __php_mempcpy, adds zend_mempcpy and transforms
open-coded parts into function calls.
2023-12-20 15:16:32 +00:00
Niels Dossche
1fc85a30b3
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix GH-12905: FFI::new interacts badly with observers
2023-12-19 15:59:43 +01:00
Niels Dossche
87c906c33a
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-12905: FFI::new interacts badly with observers
2023-12-19 15:59:35 +01:00
Niels Dossche
c727f29942
Fix GH-12905: FFI::new interacts badly with observers
...
Because these functions are copied and not properly registered (which we
can't), the observer code doesn't add the temporaries on startup.
Add them via a callback during startup.
Closes GH-12906.
2023-12-19 15:59:01 +01:00
Jakub Zelenka
d6299206dd
Merge branch 'PHP-8.3'
2023-12-15 14:14:15 +00:00
Jakub Zelenka
1b8be9acf0
Merge branch 'PHP-8.2' into PHP-8.3
2023-12-15 14:13:41 +00:00
Jakub Zelenka
40ccc8ea7e
Fix GH-9698: stream_wrapper_register crashes with FFI\CData provided as class
...
Closes GH-12926
2023-12-15 14:11:56 +00:00
Dmitry Stogov
889dadd636
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fixed regression introduced by https://github.com/php/php-src/pull/9601
2023-11-22 21:25:45 +03:00
Dmitry Stogov
adaf726373
Fixed regression introduced by https://github.com/php/php-src/pull/9601
2023-11-22 21:25:15 +03:00
David CARLIER
cc2bf11951
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. ( #12650 )
...
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.
It is mostly for ubsan and helping array bound checking.
2023-11-13 12:42:45 +00:00
Niels Dossche
d36f1bae86
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix FFI tests on 8.3+
2023-10-28 16:28:52 +02:00
Niels Dossche
43064cae94
Fix FFI tests on 8.3+
2023-10-28 16:28:43 +02:00
Arnaud Le Blanc
d30c78d7f9
Merge branch 'PHP-8.3'
...
* PHP-8.3:
[ci skip] NEWS
[ci skip] NEWS
[ci skip] NEWS
Fix segfault caused by weak references to FFI objects (#12488 )
2023-10-28 15:06:36 +02:00
Arnaud Le Blanc
198f613401
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
[ci skip] NEWS
[ci skip] NEWS
Fix segfault caused by weak references to FFI objects (#12488 )
2023-10-28 15:05:55 +02:00
Arnaud Le Blanc
7a617ee223
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
[ci skip] NEWS
Fix segfault caused by weak references to FFI objects (#12488 )
2023-10-28 15:03:17 +02:00
sji
04b35a44ce
Fix segfault caused by weak references to FFI objects ( #12488 )
...
Thank you!
2023-10-28 14:59:06 +02:00
Ilija Tovilo
f39b5c4c25
Close PHP tags in tests
...
Closes GH-12422
2023-10-18 17:34:10 +02:00
Ilija Tovilo
692cea5cbc
Use zend_error_noreturn for E_ERROR consistently
...
To be clear, these already don't return. zend_error_noreturn just hints at this
fact through the ZEND_NORETURN attribute.
Closes GH-12204
2023-09-14 11:44:55 +02:00
Niels Dossche
0b9702c9ed
Implement GH-11934: Allow to pass CData into struct and/or union fields
...
Co-authored-by: KapitanOczywisty <44417092+KapitanOczywisty@users.noreply.github.com >
Closes GH-11935.
2023-08-29 17:01:10 +02:00
Ilija Tovilo
ac99f7306c
Fix merge conflict
...
Sorry...
2023-07-21 11:17:01 +02:00
Ilija Tovilo
84cb42e0f1
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix leaking definitions on FFI::cdef()->new()
2023-07-21 10:43:13 +02:00
Ilija Tovilo
88fab26365
Merge branch 'PHP-8.1' into PHP-8.2
...
* PHP-8.1:
Fix leaking definitions on FFI::cdef()->new()
2023-07-21 10:42:42 +02:00
Ilija Tovilo
11d6bea98a
Fix leaking definitions on FFI::cdef()->new()
...
Previously, FFI_G(symbols) and FFI_G(tags) were never cleaned up when calling
new on an existing object. However, if cdef() is called without parameters these
globals are NULL and might be created when new() creates new definitions. These
would then be discarded without freeing them.
Closes GH-11751
2023-07-21 10:42:19 +02:00
Máté Kocsis
4acf0084dc
Deprecate calling FFI::cast(), FFI::new(), and FFI::type() statically
2023-07-18 12:59:21 +02:00
Máté Kocsis
6988973bc6
Declare type for ext/ffi internal class constants
...
Since the relevant classes are final, it's straightforward to declare the type of these class constants
2023-07-18 10:09:26 +02:00
Ilija Tovilo
7b355e8d34
Revert "Merge branch 'PHP-8.2'"
...
This reverts commit 45a3f178dc , reversing
changes made to b2a54bc6af .
2023-07-04 09:18:49 +02:00
Máté Kocsis
45a3f178dc
Merge branch 'PHP-8.2'
...
* PHP-8.2:
Fix GH-9967 Add support for generating custom function, class const, and property attributes in stubs
Closes GH-10170
2023-07-03 11:17:08 +02:00