Skip to content

zend_mm_heap corrupted error after upgrading from 8.4.3 to 8.4.4 #17866

@sartor

Description

@sartor

Description

My project runs tests in debian:12.8-slim docker with https://launchpad.net/~ondrej/+archive/ubuntu/php/ PHP packages

Unfortunately I can't provide full code. But error happens in toArray function in Symfony HTTP library:
https://github.com/symfony/http-foundation/blob/7.2/Request.php#L1479

With a help of @TimWolla I get this info:

$ valgrind --leak-check=full ./bin/phpunit tests/functional/api/crm/CrmGetBatchTest.php
==61547== Memcheck, a memory error detector
==61547== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==61547== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==61547== Command: ./bin/phpunit tests/functional/api/crm/CrmGetBatchTest.php
==61547== 
[INFO]  No new migrations found. Your system is up-to-date
PHPUnit 11.5.2 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.4
Configuration: /var/www/analytics/phpunit.xml

malloc(): unaligned tcache chunk detected
==61547== 
==61547== HEAP SUMMARY:
==61547==     in use at exit: 154,587 bytes in 890 blocks
==61547==   total heap usage: 2,139 allocs, 1,249 frees, 232,501 bytes allocated
==61547== 
==61547== LEAK SUMMARY:
==61547==    definitely lost: 0 bytes in 0 blocks
==61547==    indirectly lost: 0 bytes in 0 blocks
==61547==      possibly lost: 0 bytes in 0 blocks
==61547==    still reachable: 154,587 bytes in 890 blocks
==61547==         suppressed: 0 bytes in 0 blocks
==61547== Reachable blocks (those to which a pointer was found) are not shown.
==61547== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==61547== 
==61547== For lists of detected and suppressed errors, rerun with: -s
==61547== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

This bug appears not every time, but 8 of 10 runs. And only on version 8.4.4. On previous v8.4.3 all works just fine
Some history of discussion here: #17851 (comment)

PHP Version

PHP 8.4.4

Operating System

Debian 12.8 slim (docker)

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