Bug #78335 [NEW]: Segfault in zend_mm_find_leaks_small
From: kelunik
Operating system: Ubuntu 19.04
PHP version: 7.3.7
Package: Reproducible crash
Bug Type: Bug
Bug description:Segfault in zend_mm_find_leaks_small
Description:
------------
PHP segfaults in debug builds inside the memory leak detection code.
Test script:
---------------
<?php
// https://github.com/amphp/hpack/issues/2
// Commit: 0c16dfb577458dd3527167c0cb4807f5ccf76b59
require __DIR__ . '/vendor/autoload.php';
(function () {
var_dump(count(static::$huffmanLookup));
})->bindTo(new Amp\Http\HPack, Amp\Http\HPack::class)();
Expected result:
----------------
No segfault.
Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
#0 0x0000555555dfa121 in zend_mm_find_leaks_small (p=0x7ffff3600000,
i=509, j=38, leak=0x7fffffffbb80) at
/home/kelunik/.php-build/release/Zend/zend_alloc.c:2056
#1 0x0000555555dfa285 in zend_mm_find_leaks (heap=0x7ffff4000040,
p=0x7ffff3600000, i=509, leak=0x7fffffffbb80) at
/home/kelunik/.php-build/release/Zend/zend_alloc.c:2084
#2 0x0000555555dfa768 in zend_mm_check_leaks (heap=0x7ffff4000040) at
/home/kelunik/.php-build/release/Zend/zend_alloc.c:2188
#3 0x0000555555dfaa49 in zend_mm_shutdown (heap=0x7ffff4000040, full=0,
silent=0) at /home/kelunik/.php-build/release/Zend/zend_alloc.c:2253
#4 0x0000555555dfb852 in shutdown_memory_manager (silent=0,
full_shutdown=0) at
/home/kelunik/.php-build/release/Zend/zend_alloc.c:2668
#5 0x0000555555d98468 in php_request_shutdown (dummy=0x0) at
/home/kelunik/.php-build/release/main/main.c:1949
#6 0x0000555555f128c7 in do_cli (argc=2, argv=0x55555697cde0) at
/home/kelunik/.php-build/release/sapi/cli/php_cli.c:1164
#7 0x0000555555f13141 in main (argc=2, argv=0x55555697cde0) at
/home/kelunik/.php-build/release/sapi/cli/php_cli.c:1389
--
Edit bug report at https://bugs.php.net/bug.php?id=78335&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78335&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78335&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78335&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78335&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78335&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78335&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78335&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78335&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78335&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78335&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78335&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78335&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78335&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78335&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78335&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78335&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78335&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78335&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78335&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78335&r=mysqlcfg
Thread (5 messages)
- kelunik@php.net