View Issue Details

IDProjectCategoryView StatusLast Update
0002315XdebugUncategorizedpublic2025-01-28 09:45
Reporternielsdos Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.4.1 
Fixed in Version3.4dev 
Summary0002315: xdebug_dump_superglobals() leaks memory
Description

xdebug_dump_superglobals() calls xdebug_get_printable_superglobals() twice and never frees the memory.
It should only call the function once and free the memory.

Steps To Reproduce

Compile PHP with ASAN, and run the following command:

php run-xdebug-tests.php -d xdebug.mode=debug -d zend_extension=modules/xdebug.so -d zend_extension=modules/opcache.so -d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.jit=disable --show-diff --asan tests/base/bug01266.phpt
Additional Information

I found this while exploring the xdebug code base. I have a local fix ready that I will PR.
The contribution guidelines told me to make an issue first so I'm doing that.

TagsNo tags attached.
Operating SystemLinux
PHP Version8.3.10-8.3.19

Activities

nielsdos

2025-01-27 21:23

reporter   ~0007164

The pull request is now live at https://github.com/xdebug/xdebug/pull/990
I'm not sure how to properly attach a PR to the issue, so I'm just putting it in a note.

derick

2025-01-28 09:45

administrator   ~0007165

Thanks! I have merged your PR.

Issue History

Date Modified Username Field Change
2025-01-27 21:18 nielsdos New Issue
2025-01-27 21:23 nielsdos Note Added: 0007164
2025-01-28 09:45 derick Assigned To => derick
2025-01-28 09:45 derick Status new => closed
2025-01-28 09:45 derick Resolution open => fixed
2025-01-28 09:45 derick Fixed in Version => 3.4dev
2025-01-28 09:45 derick Note Added: 0007165