php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43503 Double free and segmentation fault errors
Submitted: 2007-12-05 13:46 UTC Modified: 2007-12-13 01:00 UTC
From: rorteu at arrakis dot es Assigned:
Status: No Feedback Package: ODBC related
PHP Version: 4.4.7 OS: Red Hat Enterprise Linux ES rele
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rorteu at arrakis dot es
New email:
PHP Version: OS:

 

 [2007-12-05 13:46 UTC] rorteu at arrakis dot es
Description:
------------
# php prueba.php
Content-type: text/html; charset=iso-8859-1
X-Powered-By: PHP/4.3.9

db:Resource id #1*** glibc detected *** double free or corruption (!prev): 0x09e09760 ***
Abortado
# export MALLOC_CHECK_=0
# php prueba.php
Content-type: text/html; charset=iso-8859-1
X-Powered-By: PHP/4.3.9

db:Resource id #1

# php demo.php 
Violaci?n de segmento



Reproduce code:
---------------
# cat prueba.php
<?php
$db=odbc_connect('xxx','xxx','xxx');
echo "db:".$db;
odbc_close($db);
?>

# cat demo.php 
<?php
        $conexion = odbc_connect("xxx","xxx","xxx");
        $rs = odbc_do($conexion,"select * from id");
        while (odbc_fetch_row($rs))
        {
                $valor = odbc_result($rs,1);
                echo $valor."<br>";
        }
        odbc_free_result($rs);
?>



Actual result:
--------------
# gdb php
GNU gdb Red Hat Linux (6.3.0.0-0.31rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run demo.php
Starting program: /usr/bin/php demo.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1208068416 (LWP 22317)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208068416 (LWP 22317)]
0x005e1cf0 in my_SQLPrepare () from /usr/lib/libmyodbc.so
(gdb) where
#0  0x005e1cf0 in my_SQLPrepare () from /usr/lib/libmyodbc.so
#1  0x005df18e in SQLExecDirect () from /usr/lib/libmyodbc.so
#2  0x003c7ac2 in SQLExecDirect () from /usr/lib/libodbc.so.1
#3  0x001d1dc4 in zif_odbc_exec () from /usr/lib/php4/odbc.so
#4  0x08157014 in execute ()
#5  0x08146710 in zend_execute_scripts ()
#6  0x0811d9de in php_execute_script ()
#7  0x00000000 in ?? ()
(gdb) 


Thanks in advance.
Regards.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Oct 20 21:01:23 2020 UTC