From:             gdegoulet at sdv dot fr
Operating system: Linux 2.6.10 #3 S
PHP version:      5.2.3
PHP Bug Type:     MSSQL related
Bug description:  mssql_connect() Segmentation fault (11)

Description:
------------
cat a.php

<?php
$db_name="azerty";
$db_user="azerty";
$db_pass="azerty";
$db_host="azerty.sdv.fr";

$link = mssql_connect($db_host, $db_user, $db_pass) or die('Could not
connect: ' . mssql_get_last_message());
mssql_close($link);
?>


Reproduce code:
---------------
php 5.2.3 / freetds-0.62.4
Configure Command =>  './configure'
'--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc'
'--enable-safe-mode' '--enable-memory-limit' '--with-xml' '--with-zlib'
'--enable-inline-optimization' '--with-curl' '--with-mysql=/usr'
'--with-freetype-dir=/usr' '--with-jpeg-dir' '--with-png-dir' '--with-gd'
'--enable-gd-native-ttf' '--with-sybase=/usr'


[EMAIL PROTECTED] php-5.2.3]# gdb /usr/local/bin/php
GNU gdb Red Hat Linux (6.0post-0.20040223.19rh)
Copyright 2004 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 "i386-redhat-linux-gnu"...Using host
libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run ./a.php
Starting program: /usr/local/bin/php ./a.php
Error while mapping shared library sections:
: Success.
Error while reading shared library symbols:
: No such file or directory.
[Thread debugging using libthread_db enabled]
[New Thread -1214368352 (LWP 14909)]
Error while reading shared library symbols:
: No such file or directory.
Error while reading shared library symbols:
: No such file or directory.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1214368352 (LWP 14909)]
0x0824c627 in zend_inline_hash_func (arKey=0xb7fe3000 <Address 0xb7fe3000
out of bounds>, nKeyLength=3073856464) at zend_hash.h:260
260                     hash = ((hash << 5) + hash) + *arKey++;
(gdb) where
#0  0x0824c627 in zend_inline_hash_func (arKey=0xb7fe3000 <Address
0xb7fe3000 out of bounds>, nKeyLength=3073856464) at zend_hash.h:260
#1  0x0824bab7 in zend_hash_find (ht=0x839ab20, arKey=0xb79ad0b8
"sybase_azerty.sdv.fr_azerty_azerty__", nKeyLength=3080368920,
pData=0x8f26c2a1) at /usr/local/src/php-5.2.3/Zend/zend_hash.c:870
#2  0x08202da9 in php_sybase_do_connect (ht=-1893285215,
return_value=0xb79ad0a0, return_value_ptr=0x0, this_ptr=0x0,
return_value_used=1, persistent=0) at
/usr/local/src/php-5.2.3/ext/sybase/php_sybase_db.c:495
#3  0x082039cc in zif_sybase_connect (ht=3, return_value=0xb79ad0a0,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at
/usr/local/src/php-5.2.3/ext/sybase/php_sybase_db.c:570
#4  0x0825b49e in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffd640) at zend_vm_execute.h:200
#5  0x0825ad6d in execute (op_array=0xb79ac874) at zend_vm_execute.h:92
#6  0x08244415 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/local/src/php-5.2.3/Zend/zend.c:1134
#7  0x08211255 in php_execute_script (primary_file=0xbffff9c0) at
/usr/local/src/php-5.2.3/main/main.c:1794
#8  0x0829e07a in main (argc=2, argv=0xbffffa94) at
/usr/local/src/php-5.2.3/sapi/cli/php_cli.c:1138
(gdb) quit





Expected result:
----------------
simply open - close database connection or die

Actual result:
--------------
[EMAIL PROTECTED] php-5.2.3]# php a.php 
Segmentation fault


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

Reply via email to