From:             spatar at mail dot nnov dot ru
Operating system: SuSE Linux 9.2 (i586)
PHP version:      5.1.2
PHP Bug Type:     OCI8 related
Bug description:  Crash when executing SQL statment with lob parameter after 
another SQL statment

Description:
------------
OCI8 crashes in call "oci_execute" when executing some SQL statment with
binded lob parameter after another SQL statment.
Previous version (PHP 5.1.1) doesn't produce this bug.

More details:
OS: SuSE Linux 9.2 (i586)
uname -a: Linux www 2.6.8-24-smp #1 SMP Wed Oct 6 09:16:23 UTC 2004 i686
i686 i386 GNU/Linux
Apache 2.2.0
Oracle 10.1.0.3.0
PHP 5.1.2

Reproduce code:
---------------
<?php
        function f($conn)
        {
                $sql =  "begin :p_clob := 'lob string'; end;";
                $stid = oci_parse($conn, $sql);
                $clob = oci_new_descriptor($conn, OCI_D_LOB);
                oci_bind_by_name($stid, ":p_clob", $clob, -1,
OCI_B_CLOB);
                $r = oci_execute($stid, OCI_DEFAULT);
                if ($r)
                {
                        echo $clob->load(), "\n";
                }
                $clob->free();
                oci_free_statement($stid);
        }
        $conn = oci_connect("voip_dev", "9", "RS21");
        f($conn);
        f($conn);
        oci_close($conn);
?>

Expected result:
----------------
lob string
lob string

Actual result:
--------------
#0  0xb6cfdc73 in kpufGetRcvInfo () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#1  0xb6f489b5 in ttcacr () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#2  0xb6f4a807 in ttcdrv () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#3  0xb6dec4ad in nioqwa () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#4  0xb6c5e07e in upirtrc () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#5  0xb6bf4d35 in kpurcsc () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#6  0xb6bb1831 in kpuexecv8 () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#7  0xb6bb33ac in kpuexec () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#8  0xb6c27b86 in OCIStmtExecute () from
/u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#9  0xb788ba64 in php_oci_statement_execute (statement=0x82f6c84,
mode=137325732)
    at /home/spatar/mvtm-www/php-5.1.2/ext/oci8/oci8_statement.c:321
#10 0xb788fa7a in zif_oci_execute (ht=2, return_value=0xb640b02c,
return_value_ptr=0x0, this_ptr=0x0,
    return_value_used=1) at
/home/spatar/mvtm-www/php-5.1.2/ext/oci8/oci8_interface.c:1276
#11 0xb7a07d7b in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffc240) at zend_vm_execute.h:192
#12 0xb7a56fbd in execute (op_array=0x82a6330) at zend_vm_execute.h:92
#13 0xb7a07836 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffc390) at zend_vm_execute.h:226
#14 0xb7a56fbd in execute (op_array=0x829df04) at zend_vm_execute.h:92
#15 0xb79eaf8f in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /home/spatar/mvtm-www/php-5.1.2/Zend/zend.c:1101
#16 0xb79b01ae in php_execute_script (primary_file=0xbfffe6e0) at
/home/spatar/mvtm-www/php-5.1.2/main/main.c:1720
#17 0xb7a57ac1 in php_handler (r=0x82799d0) at
/home/spatar/mvtm-www/php-5.1.2/sapi/apache2handler/sapi_apache2.c:584
#18 0x0807756b in ap_run_handler ()
...

-- 
Edit bug report at http://bugs.php.net/?id=36010&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36010&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36010&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36010&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=36010&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=36010&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=36010&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=36010&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=36010&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=36010&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=36010&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=36010&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=36010&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=36010&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36010&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=36010&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=36010&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=36010&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36010&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=36010&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=36010&r=mysqlcfg

Reply via email to