Bug #79038 [NEW]: PDOStatement::nextRowset() leaks column values
| From: | cmb@php.net | Date: | Fri, 27 Dec 2019 12:08:21 +0000 |
| Subject: | Bug #79038 [NEW]: PDOStatement::nextRowset() leaks column values | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-224552@lists.php.net to get a copy of this message | ||
From: cmb
Operating system: *
PHP version: 7.3Git-2019-12-27 (Git)
Package: PDO ODBC
Bug Type: Bug
Bug description:PDOStatement::nextRowset() leaks column values
Description:
------------
The basic problem is that PDO core sets the
column_count to
zero, before the driver specific implementation of next_rowset
is called, so the column values are never freed. Since PDO_ODBC
does not implement cursor_closer, the memory leak also happens
when PDOStatement::closeCursor() called.
The leaks can be seen when the PDO_ODBC test suite is run on a
debug build on PHP-7.4, and also for PHP-7.3 when run with
valgrind or another leak checker.
Test script:
---------------
php run-tests.php ext/pdo_odbc/tests
Expected result:
----------------
no memory leaks
Actual result:
--------------
<https://ci.appveyor.com/project/php/php-src/builds/29760248/job/qrhd1plp255gxwmy#L4986>
--
Edit bug report at https://bugs.php.net/bug.php?id=79038&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79038&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79038&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79038&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79038&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79038&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79038&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79038&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79038&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79038&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79038&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79038&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79038&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79038&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79038&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79038&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79038&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79038&r=mysqlcfg