Bug #54986 [Fbk->NoF]: Segmentation fault while executing queries with just one column
Edit report at https://bugs.php.net/bug.php?id=54986&edit=1
ID: 54986
Updated by: php-bugs@lists.php.net
Reported by: chandra dot madathil at theice dot com
Summary: Segmentation fault while executing queries with just
one column
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: ODBC related
Operating System: Red Hat Linux 5.5,64-bit
PHP Version: 5.2.17
New Comment:
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 "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2011-06-11 04:04:59] felipe@php.net
Instructions at http://bugs.php.net/bugs-getting-valgrind-log.php
------------------------------------------------------------------------
[2011-06-11 04:04:05] felipe@php.net
Can you run the test on cli using valgrind? If yes, please post the valgrind log.
------------------------------------------------------------------------
[2011-06-06 17:15:01] chandra dot madathil at theice dot com
Looks like this error is more widespread than I thought of initially. I am getting this error while
freeing the resultset for some other programs too.
Were you able to reproduce this issue? Our production server migration is delayed due to this issue.
------------------------------------------------------------------------
[2011-06-03 16:49:21] chandra dot madathil at theice dot com
Description:
------------
When the select statement includes only one column, the script crashes with "zend_mm_heap
corrupted" or segmentation fault errors. When we add a dummy column to the select statement,
the script runs successfully. Looks like some data structure initialization bug.
For example,
select name0 from COMPANY where name0 like 'A%'; -- errors out
select name0,1 from COMPANY where name0 like 'A%'; -- runs successfully
Test script:
---------------
<?php
$db_conn = odbc_connect('NZSQL','<username>','<password>')
or alert("Could not connect: " . odbc_error());
echo "Connected successfully!\n";
$query="select name0 from COMPANY where name0 like 'A%' ";
echo "executing ...\n";
$result = odbc_exec($db_conn,$query);
echo "executed query ...\n";
if (!$result) alert("Could not run query: " . odbc_error());
echo "fetching resultset ...\n";
while(odbc_fetch_array($result)) {
$row0 = odbc_result($result, 1);
echo "field1:$row0\n";
}
odbc_close($db_conn);
echo "Completed successfully\n";
function alert($errMsg) {
fwrite(STDERR, "$errMsg\n"); exit(2);
}
?>
Expected result:
----------------
Connected successfully!
executing ...
executed query ...
fetching resultset ...
field1:<company names>
....
Completed successfully
Actual result:
--------------
Connected successfully!
executing ...
zend_mm_heap corrupted
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54986&edit=1
Thread (5 messages)