Bug #81419 [Com]: A memory leak in accel_preload()

From: Date: Fri, 27 Jan 2023 23:47:24 +0000
Subject: Bug #81419 [Com]: A memory leak in accel_preload()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243582@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81419&edit=1 ID: 81419 Comment by: dossche dot niels at gmail dot com Reported by: dinghao dot liu at zju dot edu dot cn Summary: A memory leak in accel_preload() Status: Open Type: Bug Package: opcache Operating System: Any PHP Version: 8.0.10 Block user comment: N Private report: N New Comment: I don't think this qualifies as a bug: the failure path of preload_optimize will call zend_accel_error_noreturn and that function stops execution of the php process, that's why there is no cleanup handling. Previous Comments: ------------------------------------------------------------------------ [2023-01-18 05:25:07] Mae565Law at gmail dot com The consequences of memory leak is that it reduces the performance of the computer by reducing the amount of available memory. Eventually, in the worst case, too much of the available memory may become allocated and all or part of the system or device stops working correctly, the application fails, or the system slows down vastly . (https://www.gta-portal.com/)github.com ------------------------------------------------------------------------ [2021-10-17 12:38:12] dinghao dot liu at zju dot edu dot cn Sorry, currently I have no PoC for this bug. The memleak is mainly analyzed theoretically. ------------------------------------------------------------------------ [2021-10-15 15:20:01] felipe@php.net Hello, Can you provide a proper .php test case? ------------------------------------------------------------------------ [2021-09-06 08:23:28] dinghao dot liu at zju dot edu dot cn Description: ------------ There is a suspected memleak issue in ext/opcache/ZendAccelerator.c. In function accel_preload(), variable 'preload_scripts' is allocated at line 4453 through emalloc(). All paths after this allocation will execute the cleanup against this variable at 'finish' label, except for one error handling path on failure of preload_optimize() at line 4687, which may cause a memleak. This bug is suggested by a static analysis tool, please advise. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81419&edit=1

« previous php.bugs (#243582) next »