Bug #99078 | A memory leak might happen when doing lf_hash_insert | ||
---|---|---|---|
Submitted: | 26 Mar 2020 10:41 | Modified: | 9 Apr 2020 18:53 |
Reporter: | Xiong Wang | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Performance Schema | Severity: | S2 (Serious) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[26 Mar 2020 10:41]
Xiong Wang
[27 Mar 2020 13:33]
MySQL Verification Team
Hello Mr. Wang, Thank you for your bug report. I have carefully analysed that function and entire code where this function is utilised. I must admit that you are correct in your analysis. Not only that the pointer in question is allocated from heap (and not from stack), but also there are many places in the source code files where you have a conditional statement like this: If (lf_hash_insert(.......)) although this function can return both -1 or 1 in case of error. I have not encountered (so far) a single place where those two error codes are distinguished. Verified as reported, but with a higher severity.
[9 Apr 2020 18:53]
Paul DuBois
Posted by developer: Fixed in 8.0.21. A potential memory leak in lf_hash_insert() was fixed.
[10 Apr 2020 12:26]
MySQL Verification Team
Thank you, Paul.