Bug #78986 [Opn->Ver]: Memory Leak

From: Date: Wed, 18 Dec 2019 05:33:19 +0000
Subject: Bug #78986 [Opn->Ver]: Memory Leak
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224379@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78986&edit=1 ID: 78986 Updated by: requinix@php.net Reported by: j124519951 at gmail dot com Summary: Memory Leak -Status: Open +Status: Verified Type: Bug -Package: Reproducible crash +Package: opcache Operating System: Linux PHP Version: 7.4.0 Block user comment: N Private report: N New Comment: Backtrace with 7.4.1. Doesn't say much. (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00000000086fc68c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /root/php/src/Zend/zend_vm_execute.h:1617 #2 0x0000000008760401 in execute_ex (ex=0x7ffff5013020) at /root/php/src/Zend/zend_vm_execute.h:53584 #3 0x00000000087644bd in zend_execute (op_array=0x7ffff5074300, return_value=0x0) at /root/php/src/Zend/zend_vm_execute.h:57664 #4 0x000000000868880c in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php/src/Zend/zend.c:1663 #5 0x00000000085ea184 in php_execute_script (primary_file=0x7ffffffed070) at /root/php/src/main/main.c:2619 #6 0x000000000876709d in do_cli (argc=6, argv=0x965b940) at /root/php/src/sapi/cli/php_cli.c:961 #7 0x00000000087681ef in main (argc=6, argv=0x965b940) at /root/php/src/sapi/cli/php_cli.c:1352 (gdb) f 1 #1 0x00000000086fc68c in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER () at /root/php/src/Zend/zend_vm_execute.h:1617 1617 fbc->internal_function.handler(call, ret); (gdb) f 2 #2 0x0000000008760401 in execute_ex (ex=0x7ffff5013020) at /root/php/src/Zend/zend_vm_execute.h:53584 53584 ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); Previous Comments: ------------------------------------------------------------------------ [2019-12-18 05:11:58] j124519951 at gmail dot com This is no issue if I disable opcache. I use docker to build the test environment, not install any extensions except opcache. # Docker file begin FROM php:7.4-fpm-alpine RUN docker-php-ext-install opcache # Docker file end # make sure enable opcache in php.ini Test script same as what I send before. ------------------------------------------------------------------------ [2019-12-18 04:28:30] requinix@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Seems fine. https://3v4l.org/LhvkT Do you have any Zend extensions activated? Is there any difference if you enable or disable opcache? ------------------------------------------------------------------------ [2019-12-18 04:06:08] j124519951 at gmail dot com Description: ------------ When I run the test script in PHP 7.4.0, 100% run out of memory. Test script: --------------- <?php define('TEST_TEST', 1); class TestClass2 { function __construct() {} } class TestClass extends TestClass2 { var $test = [ TEST_TEST => 'test' ]; } new TestClass(); Actual result: -------------- Out of memory ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78986&edit=1

« previous php.bugs (#224379) next »