Skip to content

Memory leaks in the news streams code #22200

@mbeccati

Description

@mbeccati

Description

The phpunit test suite highlights an issue with f2b371e.

To reproduce, clone phpunit, composer install and run the following test.

1) .../tests/end-to-end/error-handler/php-warning.phpt
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
 Test Suite Finished (PHPUnit\TestFixture\ErrorHandler\PhpWarningTest, 1 test)
 Test Runner Execution Finished
 Test Runner Finished
-PHPUnit Finished (Shell Exit Code: 0)
+PHPUnit Finished (Shell Exit Code: 0)
+[Sat May 30 11:31:16 2026]  Script:  'Standard input code'
+/home/runner/work/php-latest-builds/php-latest-builds/build/main/streams/stream_errors.c(337) :  Freeing 0x00007f3ac8dbd330 (16 bytes), script=Standard input code
+[Sat May 30 11:31:16 2026]  Script:  'Standard input code'
+/home/runner/work/php-latest-builds/php-latest-builds/build/main/streams/stream_errors.c(806) :  Freeing 0x00007f3ac8dce118 (19 bytes), script=Standard input code
+[Sat May 30 11:31:16 2026]  Script:  'Standard input code'
+/home/runner/work/php-latest-builds/php-latest-builds/build/Zend/zend_string.h(258) :  Freeing 0x00007f3ac8dd3af0 (80 bytes), script=Standard input code
+[Sat May 30 11:31:16 2026]  Script:  'Standard input code'
+/home/runner/work/php-latest-builds/php-latest-builds/build/main/streams/stream_errors.c(334) :  Freeing 0x00007f3ac8deb060 (56 bytes), script=Standard input code
+=== Total 4 memory leaks detected === 

PHP Version

master as of today

Operating System

No response

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions