From: paul dot visco at roswellpark dot org Operating system: centos 5.8 PHP version: 5.4.7 Package: PDO related Bug Type: Bug Bug description:seg fault with PDO and dblib using DBSETOPT(H->link, DBQUOTEDIDENT, 1);
Description: ------------ revision #300716 to php source for /ext/pdo_dblib/ which adds support for double quoted field values causes segfault on our system. According to https://bugs.php.net/bug.php?id=47588 line 318 was added to support quoted field names. If pdo_dblib is recompiled without line 318 it works fine, no segfault. My patch is just commenting out the line, which is really not a solution but it allows us to be able to use the driver again. PHP: 5.4.7 SYSTEM: CentOS 5.8 TSQL: Version: freetds v0.91 freetds.conf directory: /etc MS db-lib source compatibility: yes Sybase binary compatibility: yes Thread safety: yes iconv library: yes TDS version: 4.2 iODBC: no unixodbc: yes SSPI "trusted" logins: no Kerberos: yes Test script: --------------- $db = new PDO('dblib:host=somehost.somesite.org;charset=UTF-8;','username', 'password'); Expected result: ---------------- Segmentation fault Actual result: -------------- Program received signal SIGSEGV, Segmentation fault. 0x00000036b68788e0 in strlen () from /lib64/libc.so.6 (gdb) bt #0 0x00000036b68788e0 in strlen () from /lib64/libc.so.6 #1 0x00000036b6846e77 in vfprintf () from /lib64/libc.so.6 #2 0x00000036b68e74a7 in __vfprintf_chk () from /lib64/libc.so.6 #3 0x00002aaab1e6ece5 in ?? () from /usr/lib64/libsybdb.so.5 #4 0x00002aaab1e43dd8 in dbsetopt () from /usr/lib64/libsybdb.so.5 #5 0x00002aaab2e51447 in pdo_dblib_handle_factory (dbh=0x2aaaaab0c298, driver_options=<value optimized out>) at /home/visco/php-5.4.7/ext/pdo_dblib_orig/dblib_driver.c:318 #6 0x00002aaab2c40099 in zim_PDO_dbh_constructor (ht=<value optimized out>, return_value=<value optimized out>, return_value_ptr=<value optimized out>, this_ptr=0x2aaaaab0a8f0, return_value_used=<value optimized out>) at /home/visco/php-5.4.7/ext/pdo/pdo_dbh.c:380 #7 0x00002aaaae23df42 in xdebug_execute_internal (current_execute_data=0x2aaaaaad5060, return_value_used=0) at /tmp/tmpBeyREt/xdebug-2.2.1/xdebug.c:1483 #8 0x00000000006008e7 in ?? () #9 0x000000000060680e in execute () #10 0x00002aaaae24061f in xdebug_execute (op_array=0x2aaaaab0b160) at /tmp/tmpBeyREt/xdebug-2.2.1/xdebug.c:1391 #11 0x00000000005d1dbe in zend_execute_scripts () #12 0x00000000005770d8 in php_execute_script () #13 0x00000000006789cd in ?? () #14 0x000000000067934d in ?? () #15 0x00000036b681d994 in __libc_start_main () from /lib64/libc.so.6 #16 0x00000000004239c9 in _start () -- Edit bug report at https://bugs.php.net/bug.php?id=63258&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63258&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63258&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63258&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63258&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63258&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63258&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63258&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63258&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63258&r=support Expected behavior: https://bugs.php.net/fix.php?id=63258&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63258&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63258&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63258&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63258&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63258&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63258&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63258&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63258&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63258&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63258&r=mysqlcfg