[php-src] Issue #15908: Core dumped in main/streams/streams.c

From: Date: Mon, 16 Sep 2024 09:02:33 +0000
Subject: [php-src] Issue #15908: Core dumped in main/streams/streams.c
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247793@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15908 Author: YuanchengJiang ### Description The following code: ```php <?php class TestStream { //data, empty data, empty data + eof public $context; private $s = 0; function stream_open($path, $mode, $options, &$opened_path) { return true; } function stream_read($count) { echo "Read done\n"; if ($this->s++ == 0) return "a\nbb\ncc"; return ""; } function stream_eof() { return $this->s >= 2; } } stream_wrapper_register("test", "TestStream"); $f = fopen("test://", "r"); file_put_contents(1, $f, 1, $f); ?> ``` Resulted in this output: ``` /php-src/main/streams/streams.c:2214: _php_stream_open_wrapper_ex: Assertion `resolved_path == ((void *)0)' failed. Aborted (core dumped) ``` ### PHP Version PHP 8.4.0-dev ### Operating System ubuntu 22.04

« previous php.bugs (#247793) next »