|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73879 USE_ZEND_ALLOC=0 PDOStatement exits with "Out of memory" for empty results
Submitted: 2017-01-06 11:03 UTC Modified: 2017-01-22 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: c dot schiffler at cyberspectrum dot de Assigned:
Status: No Feedback Package: PDO MySQL
PHP Version: 7.0.14 OS: Debian testing
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: c dot schiffler at cyberspectrum dot de
New email:
PHP Version: OS:


 [2017-01-06 11:03 UTC] c dot schiffler at cyberspectrum dot de
I am using USE_ZEND_ALLOC=0 for debugging PDO

This bug somewhat relates to, 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');
$stmt = $dbh->prepare('SELECT * FROM test WHERE 1=2');

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-08 13:04 UTC]
-Status: Open +Status: Feedback
 [2017-01-08 13:04 UTC]
Thanks for the report. Please either use Opcache or Xdebug, not both together. Best is probably even to unload both, depending on what exactly you're debugging.

 [2017-01-22 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 05:01:26 2024 UTC