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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 17:01:34 2025 UTC