#23376 [NEW]: crash using OCINewDescriptor

From: Date: Sun, 27 Apr 2003 22:43:12 +0000
Subject: #23376 [NEW]: crash using OCINewDescriptor
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38523@lists.php.net to get a copy of this message
From: francesco dot laurita at NOSPAM_fastweb dot it Operating system: Linux 2.4.19 PHP version: 4.3.1 PHP Bug Type: Reproducible crash Bug description: crash using OCINewDescriptor 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 bug report at http://bugs.php.net/?id=23376&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23376&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23376&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23376&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23376&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23376&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23376&r=support Expected behavior: http://bugs.php.net/fix.php?id=23376&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23376&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23376&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23376&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23376&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23376&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23376&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23376&r=gnused

« previous php.bugs (#38523) next »