From:             
Operating system: Linux
PHP version:      5.3.5
Package:          OCI8 related
Bug Type:         Bug
Bug description:segfault in liclntsh.so when using shared oci8 extension

Description:
------------
use the latest php 5.3.5, tested in:

gcc 4.4.5, ubuntu 10.10 x86, oracle express;

gcc ???, asia linux 2(same as RHEL5?) x86, oracle 10g R2;

gcc ???, centos 4.5 x86, oracle 10g R1.



./configure --disable-all --disable-cgi --without-pear --with-

oci8=shared,$ORACLE_HOME

make



php.ini:

extension_dir = "./modules"

extension = oci8.so

oci8.privileged_connect = On



environment variable ORACLE_HOME and ORACLE_SID are both correct.



when using NULL as connection_string in oci_connect() to connect to
oracle:

sapi/cli/php -c php.ini -r "oci_internal_debug(TRUE); 

var_dump(oci_connect('sys', 'sys', NULL, NULL, OCI_SYSDBA));"



it crashes:

OCI8 DEBUG: OCIHandleAlloc at
(/home/xianda/php-5.3.5.orig/ext/oci8/oci8.c:1067)

OCI8 DEBUG: OCIConnectionPoolCreate at (/home/xianda/php-

5.3.5.orig/ext/oci8/oci8.c:1068)

OCI8 DEBUG: OCIConnectionPoolDestroy at (/home/xianda/php-

5.3.5.orig/ext/oci8/oci8.c:1069)

OCI8 DEBUG: OCIHandleFree at
(/home/xianda/php-5.3.5.orig/ext/oci8/oci8.c:1070)

OCI8 DEBUG: OCINlsEnvironmentVariableGet at (/home/xianda/php-

5.3.5.orig/ext/oci8/oci8.c:1826)

OCI8 DEBUG L1: Got NO cached connection at (/home/xianda/php-

5.3.5.orig/ext/oci8/oci8.c:1871)

OCI8 DEBUG: Bypassing client-side session pool for session create at 

(/home/xianda/php-5.3.5.orig/ext/oci8/oci8.c:2833)

OCI8 DEBUG: OCIEnvNlsCreate at (/home/xianda/php-

5.3.5.orig/ext/oci8/oci8.c:2810)

OCI8 DEBUG: OCIHandleAlloc at
(/home/xianda/php-5.3.5.orig/ext/oci8/oci8.c:2842)

OCI8 DEBUG: OCIServerAttach at (/home/xianda/php-

5.3.5.orig/ext/oci8/oci8.c:2850)

Segmentation fault



and the call stack shows that it crashes inside the libclntsh.so.



But if I provide a value for connection_string in oci_connect(), it works
fine, 

and the call stack in the libclntsh.so is different.



And I try to build php using oci8 as a "static"
extension(--oci8=$ORACLE_HOME), 

it also works fine when setting connection_string to NULL(this proves that
my 

ORACLE_HOME and ORACLE_SID are correct).



And I test this in the previous three platforms, it acts the same. And I
also 

try to use the latest instant client 10 and 11, the same results come out.
So I 

believe that it can be easily reproduced in most or all platforms.



So is it the bug of php or oracle's client library???


-- 
Edit bug report at http://bugs.php.net/bug.php?id=53820&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53820&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53820&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53820&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53820&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53820&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53820&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53820&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53820&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53820&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53820&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53820&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53820&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53820&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53820&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53820&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53820&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53820&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53820&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53820&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53820&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53820&r=mysqlcfg

Reply via email to