From:
Operating system: ubuntu 10.4 amd64
PHP version: 5.3.3
Package: ODBC related
Bug Type: Bug
Bug description:crash when result set contains NULL
Description:
------------
PHP (CLI) crashes (Segfault) on a NULL in the result set.
- latest easysoft odbc-odbc bridge and unixODBC-2.3.0 (compiled from
source)
- php-5.3.3 compiled from source (--with-unixODBC)
Database is a PROGRESS OPENEDGE 10.1C database.
Actual result:
--------------
#0 0x00007ffff5386085 in memcpy () from /lib/libc.so.6
#1 0x00000000006dee08 in _estrndup (s=0x1331c08 "\030\034\063\001",
length=
<value optimized out>) at /usr/include/bits/string3.h:52
#2 0x0000000000579b6a in zif_odbc_result (ht=<value optimized out>,
return_value=0x1332c60, return_value_ptr=<value optimized out>,
this_ptr=<value
optimized out>, return_value_used=<value optimized out>)
at /usr/src/php-5.3.3/ext/odbc/php_odbc.c:2110
#3 0x0000000000746a3c in zend_do_fcall_common_helper_SPEC
(execute_data=0x7ffff7e8ab58) at
/usr/src/php-5.3.3/Zend/zend_vm_execute.h:316
#4 0x000000000071ebd8 in execute (op_array=0x10b4380) at /usr/src/php-
5.3.3/Zend/zend_vm_execute.h:107
#5 0x00000000006f982a in zend_execute_scripts (type=8, retval=<value
optimized
out>, file_count=3) at /usr/src/php-5.3.3/Zend/zend.c:1194
#6 0x00000000006a80ed in php_execute_script (primary_file=<value optimized
out>) at /usr/src/php-5.3.3/main/main.c:2260
#7 0x000000000078064e in main (argc=<value optimized out>, argv=<value
optimized out>) at /usr/src/php-5.3.3/sapi/cli/php_cli.c:1192
--
Edit bug report at http://bugs.php.net/bug.php?id=53007&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53007&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53007&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=53007&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53007&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=53007&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53007&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=53007&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=53007&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=53007&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=53007&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=53007&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=53007&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=53007&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53007&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53007&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53007&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=53007&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=53007&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=53007&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=53007&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=53007&r=mysqlcfg