PHP 4.0 Bug #1957: SIgSegV while insert of LONG field

From: Date: Wed, 04 Aug 1999 13:51:58 +0000
Subject: PHP 4.0 Bug #1957: SIgSegV while insert of LONG field
Groups: php.dev 
Request: Send a blank email to php-dev+get-9497@lists.php.net to get a copy of this message
From: jbr@aadviser.com Operating system: Linux Kernel 2.2.10 PHP version: 4.0 Latest CVS (04/08/1999) PHP Bug Type: ODBC related Bug description: SIgSegV while insert of LONG field 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

« previous php.dev (#9497) next »