[php-src] Issue #20815: PHP 8.3 with libcurl 7.29.0 segmentation fault
[email protected] (thg2k)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <L53V9XX8B5mu9uUqa0gBZiazmFrM5tZewLXWqx4zv9A@main.internal.php.net> |
Issue: https://github.com/php/php-src/issues/20815 Author: thg2k ### Description I know this is a bit late to the party, but as the last 8.3 bugfix release is about to happen, I was wondering if we can get this segfault fixed. The reason is very straightforward, the multi init should be followed by at least one curl_multi_add_handler before it is destroyed, otherwise the library crashes in the curl_multi_cleanup function. I'd happy to provide a PR but I will need a few more days, if somebody has a quick fix idea please go ahead. For the records, this bug exists since at least PHP 7.2. The following code: ```php <?php $ch = curl_multi_init(); unset($ch); print "EOF\n"; ``` Resulted in this output: ``` Segmentation fault (core dumped) ``` But I expected this output instead: ``` EOF ``` ### PHP Version ```plain PHP 8.3.29 (cli) (built: Dec 29 2025 17:10:47) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.29, Copyright (c) Zend Technologies ``` ### Operating System _No response_