New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MEMORY_LEAK in phpdbg_prompt.c #12675
Labels
Comments
ellena13
changed the title
MEMORY_LEAK in /sapi/phpdbg/phpdbg_prompt.c
MEMORY_LEAK in phpdbg_prompt.c
Nov 15, 2023
There's even a second one in the |
nielsdos
added a commit
to nielsdos/php-src
that referenced
this issue
Nov 15, 2023
Have to use file_put_contents() instead of --FILE-- because we have to actually load it using the exec command, *and* have to make multiple files, and note that we can only load files relative from the current directory, so we can't rely on files being in the sapi/phpdbg/tests folder.
nielsdos
added a commit
to nielsdos/php-src
that referenced
this issue
Nov 15, 2023
Have to use file_put_contents() instead of --FILE-- because we have to actually load it using the exec command, *and* have to make multiple files, and note that we can only load files relative from the current directory, so we can't rely on files being in the sapi/phpdbg/tests folder.
nielsdos
added a commit
that referenced
this issue
Nov 15, 2023
* PHP-8.2: Use __DIR__-relative path in tests Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
nielsdos
added a commit
that referenced
this issue
Nov 15, 2023
* PHP-8.3: Use __DIR__-relative path in tests Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
ramsey
pushed a commit
that referenced
this issue
Nov 23, 2023
Have to use file_put_contents() instead of --FILE-- because we have to actually load it using the exec command, *and* have to make multiple files, and note that we can only load files relative from the current directory, so we can't rely on files being in the sapi/phpdbg/tests folder. Closes GH-12680.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Dynamic memory, referenced by
res
, is allocated at phpdbg_utils.c:154 :php-src/sapi/phpdbg/phpdbg_utils.c
Lines 146 to 155 in cde956a
by calling function
phpdbg_resolve_path
at phpdbg_prompt.c:405 and lost at phpdbg_prompt.c:411 :php-src/sapi/phpdbg/phpdbg_prompt.c
Lines 405 to 412 in cde956a
The allocated memory will be lost even if the condition at phpdbg_prompt.c:408 is false.
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author E. Bykhanova.
PHP Version
PHP 8.2.3
Operating System
ALT Linux
The text was updated successfully, but these errors were encountered: