View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002224 | Xdebug | Uncategorized | public | 2023-12-07 18:00 | 2023-12-08 16:10 |
Reporter | kraplax | Assigned To | derick | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Platform | x86 | OS | Linux | OS Version | any |
Product Version | 3.3.0 | ||||
Summary | 0002224: XDebug conflicts with PHP FFI extension - crashes on FFI::new() call | ||||
Description | For PHP 8.2 and 8.3 when XDebug 3.3.0 is installed, the FFI extension crashes on the call to FFI::new() method:
It doesn't affect 8.1 and older versions. Cannot be reproduced with XDebug 3.2.2. | ||||
Steps To Reproduce | Install PHP 8.2 or PHP 8.3 Run following code example:
| ||||
Tags | crash, ffi, php8.2, php8.3 | ||||
Attached Files | xdebug_ffi.dockerfile (275 bytes)
FROM php:8.2-cli RUN apt update && apt install -y libffi-dev RUN docker-php-ext-install -j$(nproc) ffi RUN pecl install xdebug-3.3.0 && docker-php-ext-enable xdebug RUN echo '<?php $ffi = FFI::cdef("", "libc.so.6"); $ffi->new("int");' > test.php CMD ["php", "test.php"] | ||||
Operating System | |||||
PHP Version | 8.2.0-8.2.9 | ||||
|
This turned out not to be a bug with Xdebug, but with how FFI interacts with observers. In a clean PHP compile, compiled with, and running with your test script in
I get the same error (please note that I use
I've filed a bug with PHP: https://github.com/php/php-src/issues/12905 |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-12-07 18:00 | kraplax | New Issue | |
2023-12-07 18:00 | kraplax | Tag Attached: crash | |
2023-12-07 18:00 | kraplax | Tag Attached: ffi | |
2023-12-07 18:00 | kraplax | Tag Attached: php8.2 | |
2023-12-07 18:00 | kraplax | Tag Attached: php8.3 | |
2023-12-07 18:00 | kraplax | File Added: xdebug_ffi.dockerfile | |
2023-12-08 16:10 | derick | Assigned To | => derick |
2023-12-08 16:10 | derick | Status | new => resolved |
2023-12-08 16:10 | derick | Resolution | open => no change required |
2023-12-08 16:10 | derick | Note Added: 0006716 |