Bug #70123 [NEW]: OOM on odbc_exec against DB2

From: Date: Fri, 24 Jul 2015 00:01:26 +0000
Subject: Bug #70123 [NEW]: OOM on odbc_exec against DB2
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-194664@lists.php.net to get a copy of this message
From: twist at fowlie dot net Operating system: Ubuntu 14.04.2 x64 PHP version: 5.6.11 Package: ODBC related Bug Type: Bug Bug description:OOM on odbc_exec against DB2 Description: ------------ When running 5.6.11 with unix_odbc (2.2.14p2) and the iSeriesAccess (6.1.0-2.2) drivers, I received an OOM where PHP tries to allocate an enormous amount of memory for a very simple query. Once it hits odbc_exec() it throws the fatal error. The same configuration and script runs on 5.3.2 as expected. Unfortunately, I don't know my way around the source to suggest a fix as the developer in Bug #69354 did. I'm comfortable applying patches and running things through make with some guidance. My php.ini is stock Ubuntu. Test script: --------------- putenv("DB2DIR=/opt/ibm/iSeriesAccess/lib64/"); putenv("ODBCINI=/etc/odbc.ini"); $dbh = odbc_connect("LMS", user, pass); $query = "select * from CNFNAR where NCNARR like '%JDF%'"; $res = odbc_exec($dbh, $query); Actual result: -------------- PHP Fatal error: Out of memory (allocated 262144) (tried to allocate 14944499140640374786 bytes) on line 2 -- Edit bug report at https://bugs.php.net/bug.php?id=70123&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70123&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70123&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70123&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=70123&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=70123&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=70123&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=70123&r=needscript Try newer version: https://bugs.php.net/fix.php?id=70123&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=70123&r=support Expected behavior: https://bugs.php.net/fix.php?id=70123&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=70123&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=70123&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=70123&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70123&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=70123&r=dst IIS Stability: https://bugs.php.net/fix.php?id=70123&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=70123&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=70123&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=70123&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=70123&r=mysqlcfg

« previous php.bugs (#194664) next »