#23376 [Opn->Fbk]: crash using OCINewDescriptor
| From: | sniper@php.net | Date: | Mon, 28 Apr 2003 13:00:59 +0000 |
| Subject: | #23376 [Opn->Fbk]: crash using OCINewDescriptor | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38549@lists.php.net to get a copy of this message | ||
ID: 23376
Updated by: sniper@php.net
Reported By: francesco dot laurita at NOSPAM_fastweb dot it
-Status: Open
+Status: Feedback
Bug Type: OCI8 related
Operating System: Linux 2.4.19
PHP Version: 4.3.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-04-27 17:43:12] francesco dot laurita at NOSPAM_fastweb dot it
PHP crash when i try to execute this (wrong) pice of code:
$id = OciLogon("user","pass","db");
$sql = "BEGIN UTENTI_PKG.SEL_ALL_USER(:retVal);END;";
$stmt = OCIParse($id,$sql);
$cur = OCINewDescriptor($id, OCI_B_CURSOR);
OciBindByName($stmt, ':retVal' , &$cur , -1 , OCI_B_CURSOR);
OciExecute($stmt);
error:
[root@stealthp htdocs]# php -q info.php
Warning: Unknown descriptor type 116. in
/usr/local/apache/htdocs/info.php on line 8
Segmentation fault (core dumped)
[root@stealthp htdocs]#
gdb output:
[root@stealthp htdocs]# gdb /usr/local/bin/php core.6325
GNU gdb 5.2.1-2mdk (Mandrake Linux)
Copyright 2002 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 "i586-mandrake-linux-gnu"...
Core was generated by `php -q info.php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from
/opt2/oracle/product/9.2.0/lib/libclntsh.so.9.0...done.
Loaded symbols for /opt2/oracle/product/9.2.0/lib/libclntsh.so.9.0
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /opt2/oracle/product/9.2.0/lib/libwtc9.so...done.
Loaded symbols for /opt2/oracle/product/9.2.0/lib/libwtc9.so
Reading symbols from /lib/i686/libpthread.so.0...done.
Loaded symbols for /lib/i686/libpthread.so.0
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0 0x08072b7a in zif_ocinewdescriptor (ht=2, return_value=0x81ed864,
this_ptr=0x0, return_value_used=1)
at /root/php-4.3.1/ext/oci8/oci8.c:3538
3538 add_property_resource(return_value, "descriptor",
descr->id);
(gdb) bt
#0 0x08072b7a in zif_ocinewdescriptor (ht=2, return_value=0x81ed864,
this_ptr=0x0, return_value_used=1)
at /root/php-4.3.1/ext/oci8/oci8.c:3538
#1 0x081283c6 in execute (op_array=0x81d9a24) at
/root/php-4.3.1/Zend/zend_execute.c:1596
#2 0x0811b267 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /root/php-4.3.1/Zend/zend.c:864
#3 0x080f464e in php_execute_script (primary_file=0xbffff6e0) at
/root/php-4.3.1/main/main.c:1573
#4 0x0812cf3f in main (argc=3, argv=0xbffff774) at
/root/php-4.3.1/sapi/cli/php_cli.c:746
#5 0x409c0082 in __libc_start_main () from /lib/i686/libc.so.6
(gdb) frame 1
#1 0x081283c6 in execute (op_array=0x81d9a24) at
/root/php-4.3.1/Zend/zend_execute.c:1596
1596
((zend_internal_function *)
EX(function_state).function)->handler(EX(opline)->extended_value,
EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr,
return_value_used TSRMLS_CC);
(gdb) exit
Undefined command: "exit". Try "help".
(gdb) quit
[root@stealthp htdocs]#
configure option:
'./configure' \
'--enable-ftp' \
'--with-apxs=/usr/local/apache/bin/apxs' \
'--with-oci8=/opt2/oracle/product/9.2.0' \
'--with-mysql=/usr/local/mysql' \
'--enable-sigchild' \
'--enable-cli' \
ini file:
default values
best regads!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23376&edit=1