Bug #69381 [Ana]: out of memory with sage odbc driver (ok in 5.6.5)
| From: | ab@php.net | Date: | Mon, 27 Apr 2015 14:43:40 +0000 |
| Subject: | Bug #69381 [Ana]: out of memory with sage odbc driver (ok in 5.6.5) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-192357@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69381&edit=1
ID: 69381
Updated by: ab@php.net
Reported by: JLH at Dataplan dot co dot uk
Summary: out of memory with sage odbc driver (ok in 5.6.5)
Status: Analyzed
Type: Bug
Package: ODBC related
Operating System: Windows 2012r2 nts
PHP Version: 5.6.7
Assigned To: ab
Block user comment: N
Private report: N
New Comment:
@JLH thanks for the delivery, I can now confirm the insights of @cmb.
The Sage driver claims compatibility with ODBC 3.8, however this piece seems to be a bug in that
driver. SQL_DESC_OCTET_LENGTH is introduced with ODBC 3.0, so it should be supported. @JLH it might
probably make sense to report this to the origin.
I'm going to debug this more next days, seems that other drivers having unclean 3.x
implementations may be sensitive to this as well. In the worst case I guess we'll need to apply
the quirk from the bug #68350.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2015-04-26 18:25:19] cmb@php.net
The ODBC trace[1] explains what's happening. The SQLColAttributes
call for SQL_DESC_CONCISE_TYPE[2] returns SQL_VARCHAR. That causes
SQLColAttributes to be called with SQL_DESC_OCTET_LENGTH[3] to get
the displaysize, but the driver can't handle that attribute.
However, the SQL_ERROR is not caught, and the implementation
proceeds with emalloc'ing whatever is stored in displaysize.
For comparison, see the ODBC trace[4] under PHP 5.6.5.
This issue is closely related to bug #68350.
Anatol, can you please have a look.
[1] <https://gist.github.com/cmb69/e34ce51bfc50f6a8c8d6>
[2] <http://lxr.php.net/xref/PHP_TRUNK/ext/odbc/php_odbc.c#959>
[3] <http://lxr.php.net/xref/PHP_TRUNK/ext/odbc/php_odbc.c#994>
[4] <https://gist.github.com/cmb69/39662a0973653ddf7880>
------------------------------------------------------------------------
[2015-04-26 04:22:18] 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.
------------------------------------------------------------------------
[2015-04-23 17:36:30] JLH at Dataplan dot co dot uk
Sorry for the delay
I have put the standard sage demo data, the odbc driver and a readme.txt at
http://109.234.200.229/php69381/
Hope that helps
------------------------------------------------------------------------
[2015-04-15 07:29:26] ab@php.net
@JLH, you've already shown the error messages and confirmed the bug is still present, no need
to just see that again.
What I'm asking for is to be able to debug and recompile PHP using your driver and data, and
then make a fix and a unit test. So it were probably easier the other way round - if you could
please supply the test db and the driver. Maybe they have some trial of the driver?
Thanks.
------------------------------------------------------------------------
[2015-04-14 17:15:06] JLH at Dataplan dot co dot uk
Other than the code above, it requires sage accounts be installed on the machine (or its odbc driver
at least) which is not free software.
I could provide you access to a test virtual machine for you to see the problem on with a demo data
set in sage if that is ok?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=69381
--
Edit this bug report at https://bugs.php.net/bug.php?id=69381&edit=1