[php-src] Issue #10670: Php8.1 with alternative malloc allocators
| From: | ryancinsight | Date: | Wed, 22 Feb 2023 21:29:39 +0000 |
| Subject: | [php-src] Issue #10670: Php8.1 with alternative malloc allocators | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-243786@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/10670
Author: ryancinsight
### Description
The following code:
```php
LD_PRELOAD=libsnmallocshim.so php cron.php
```
Resulted in this output:
```
FREE(): invalid pointer
Aborted
```
But I expected this output instead:
```
111111111
```
more info is here:
https://github.com/microsoft/snmalloc/issues/595
https://github.com/microsoft/mimalloc/issues/377
I’m not an allocator expert but seems valgrind is showing memory leaks with alternative allocators
and free is being called by malloc when replaced with LD_PRELOAD
### PHP Version
PHP 8.1
### Operating System
Debian Bullseye