Bug #73879 [NEW]: USE_ZEND_ALLOC=0 PDOStatement exits with "Out of memory" for empty results

From: Date: Fri, 06 Jan 2017 11:03:11 +0000
Subject: Bug #73879 [NEW]: USE_ZEND_ALLOC=0 PDOStatement exits with "Out of memory" for empty results
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-206312@lists.php.net to get a copy of this message
From: c dot schiffler at cyberspectrum dot de Operating system: Debian testing PHP version: 7.0.14 Package: PDO MySQL Bug Type: Bug Bug description:USE_ZEND_ALLOC=0 PDOStatement exits with "Out of memory" for empty results Description: ------------ I am using USE_ZEND_ALLOC=0 for debugging PDO This bug somewhat relates to https://bugs.php.net/bug.php?id=73370, however it is pretty severe as it makes PDO unusable with "USE_ZEND_ALLOC=0". PDOStatement exits the PHP process with "Out of memory" when executing ANY query that returns an empty result set. No exception, warning or anything else is raised. Calling the same script with "USE_ZEND_ALLOC=1" fixes the problem but is not intended as it prevents to debug PDO without memory manager. System environment: $ php -v PHP 7.0.14-2 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.14-2, Copyright (c) 1999-2016, by Zend Technologies with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans Test script: --------------- $dbh = new \PDO('mysql:dbname=test;host=localhost', 'test', 'test'); $dbh->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $stmt = $dbh->prepare('SELECT * FROM test WHERE 1=2'); $stmt->execute(); Expected result: ---------------- The execute method should return true as the query is valid and has correctly been processed by MySQL. Actual result: -------------- The PHP process writes "Out of memory" to STDERR and exits with status 1 -- Edit bug report at https://bugs.php.net/bug.php?id=73879&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73879&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73879&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73879&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=73879&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=73879&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=73879&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=73879&r=needscript Try newer version: https://bugs.php.net/fix.php?id=73879&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=73879&r=support Expected behavior: https://bugs.php.net/fix.php?id=73879&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=73879&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=73879&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=73879&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73879&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=73879&r=dst IIS Stability: https://bugs.php.net/fix.php?id=73879&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=73879&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=73879&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=73879&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=73879&r=mysqlcfg

« previous php.bugs (#206312) next »