php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1957 SIgSegV while insert of LONG field
Submitted: 1999-08-04 09:51 UTC Modified: 1999-10-03 06:53 UTC
From: jbr at aadviser dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0 Latest CVS (04/08/1999) OS: Linux Kernel 2.2.10
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: jbr at aadviser dot com
New email:
PHP Version: OS:

 

 [1999-08-04 09:51 UTC] jbr at aadviser dot com
The following short PHP-program produces a segmentation violation. For
debug purpose run from the coomand line. Same happens while running as
an apache module.

<?
$cid=odbc_connect('DataBase','user','pass');
$statement="insert into test (field1,field2,field3) values ('hello','test',?)";
$xx=odbc_prepare($cid,$statement);
if ($xx)
{
        $LongData[0]="Testing";
        $xy=odbc_execute($xx,$LongData);
}
odbc_close($cid);
echo "All_Done";
?>

Debugger output:
Script:  '/var/web/ricardo2/htdocs/test.phtml'
---------------------------------------
odbc.c(1781) : Block 0x08191D38 status:
Beginning:      OK (allocated on odbc.c:1594, 32 bytes)
      End:      Overflown (magic=0x2A8FCC00 instead of 0x2A8FCC84)
                1 byte(s) overflown
---------------------------------------

Program received signal SIGSEGV, Segmentation fault.
zval_ptr_dtor (zval_ptr=0x81958d0) at zend_execute_API.c:213
213             (*zval_ptr)->refcount--;
(gdb) bt
#0  zval_ptr_dtor (zval_ptr=0x81958d0) at zend_execute_API.c:213
#1  0x8077adf in zend_hash_destroy (ht=0x81957e8) at zend_hash.c:735
#2  0x8080c29 in php3_odbc_execute (ht=2, return_value=0xbffff5b0, list=0x816b640, plist=0x816b66c, this_ptr=0x0) at odbc.c:736
#3  0x807e44f in execute (op_array=0x81904f0) at zend_execute.c:1410
#4  0x805f4ec in php_execute_script (primary_file=0xbffff7cc) at main.c:1136
#5  0x80650d9 in main (argc=2, argv=0xbffff7f4) at cgi_main.c:448



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-03 06:53 UTC] kara at cvs dot php dot net
Should be gone with later versions
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC