You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The file /php-src/Zend/Optimizer/escape_analysis.c has a memory leak defect at line 417 #15020
In the file /php-src/Zend/Optimizer/escape_analysis.c, at line 387, a pointer variable named ees is defined. At line 411, this variable allocates a dynamic memory area using the do_alloca function. If the conditional statement at line 412 evaluates to false, it indicates that the dynamic memory allocation pointed to by ees was successful. However, if the conditional statement at line 416 evaluates to true, the function will return at line 417, bypassing the deallocation of the dynamic memory area pointed to by ees at line 532. This situation constitutes a memory leak, as illustrated in the diagram below: https://github.com/LuMingYinDetect/php_defects/blob/main/php_1.png
Actually, I sometimes run static analysis tools on PHP. That's how I started in my early contribution days actually.
I even experiment with my own tools on PHP.
Actually, I sometimes run static analysis tools on PHP. That's how I started in my early contribution days actually.
I even experiment with my own tools on PHP.
This is a tool I improved based on the Clang Static Analyzer, and I am planning to submit a paper on it. I will open-source the tool in the paper!
Reacted by Nora Dossche, 3kbest and Rokas Mikalkėnas
Activity
Fix phpGH-15020: Memory leak in Zend/Optimizer/escape_analysis.c
Fix GH-15020: Memory leak in Zend/Optimizer/escape_analysis.c
Merge branch 'PHP-8.2' into PHP-8.3
Merge branch 'PHP-8.3'
Bilge commentedon Aug 29, 2024
Is this some kind of bot?
ndossche commentedon Aug 29, 2024
While there are certainly bots like these, I think this is a real person using static analysis, given the varying wording between the issues.
Bilge commentedon Aug 29, 2024
Why don't we have his static analysis tools? 😆
ndossche commentedon Aug 29, 2024
Actually, I sometimes run static analysis tools on PHP. That's how I started in my early contribution days actually.
I even experiment with my own tools on PHP.
LuMingYinDetect commentedon Aug 30, 2024
This is a tool I improved based on the Clang Static Analyzer, and I am planning to submit a paper on it. I will open-source the tool in the paper!
LuMingYinDetect commentedon Aug 30, 2024
This is a tool I improved based on the Clang Static Analyzer, and I am planning to submit a paper on it. I will open-source the tool in the paper!