From:             bugs at kilimajer dot net
Operating system: Linux
PHP version:      5.1.4
PHP Bug Type:     Reproducible crash
Bug description:  PDO sqlite module crashes

Description:
------------
Crashes happen in both mod_php and CLI. sqlite is version 3.3.6

php configure:

'./configure' '--with-xsl' '--enable-sysvmsg' '--enable-sysvsem'
'--enable-sysvshm' '--with-jpeg-dir=/usr' '--enable-sockets'
'--enable-soap' '--with-readline' '--with-pgsql' '--enable-pcntl'
'--with-ncurses' '--with-mysql=/usr' '--with-mime-magic' '--with-mcrypt'
'--with-gd' '--enable-ftp' '--enable-exif' '--with-curl' '--with-bz2'
'--with-openssl' '--with-zlib-dir=/usr' '--with-apxs2=/usr/sbin/apxs'
'--with-mysqli=shared,/usr/bin/mysql_config' '--enable-gd-native-ttf'
'--with-ttf' '--with-xpm-dir=/usr/X11R6/'
'--with-freetype-dir=/usr/include/freetype2' '--with-png' '--with-jpeg'
'--enable-mbstring=all' '--enable-mbregex' '--enable-memory-limit'
'--with-mhash' '--with-mcrypt' '--enable-debug' '--with-tidy'
'--enable-sqlite-utf8' '--with-pdo-sqlite=/usr' '--with-sqlite=/usr'


Reproduce code:
---------------
$dbh = new PDO('sqlite:memory');
$dbh->query('select 1');

Expected result:
----------------
nothing, the code is not outputing anything

Actual result:
--------------
Segmentation fault, with this backtrace:

(gdb) bt
#0  pdo_stmt_instantiate (dbh=0x8715cd4, object=0x8715fd4, dbstmt_ce=0x0,
ctor_args=0x11) at /data/src/php/php-5.1.4/ext/pdo/pdo_dbh.c:398
#1  0x0817d9d1 in zif_PDO_query (ht=1, return_value=0x8715fd4,
return_value_ptr=0x0, this_ptr=0x86fe474, return_value_used=0)
    at /data/src/php/php-5.1.4/ext/pdo/pdo_dbh.c:962
#2  0x0830984a in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfa61fd0) at
/data/src/php/php-5.1.4/Zend/zend_vm_execute.h:200
#3  0x08308e91 in execute (op_array=0x87117cc) at
/data/src/php/php-5.1.4/Zend/zend_vm_execute.h:92
#4  0x082ef696 in zend_execute_scripts (type=8, retval=Variable "retval"
is not available.
) at /data/src/php/php-5.1.4/Zend/zend.c:1109
#5  0x082b352d in php_execute_script (primary_file=0xbfa643d4) at
/data/src/php/php-5.1.4/main/main.c:1732
#6  0x08384bad in main (argc=2, argv=0xbfa644b4) at
/data/src/php/php-5.1.4/sapi/cli/php_cli.c:1092
(gdb) frame 0
#0  pdo_stmt_instantiate (dbh=0x8715cd4, object=0x8715fd4, dbstmt_ce=0x0,
ctor_args=0x11) at /data/src/php/php-5.1.4/ext/pdo/pdo_dbh.c:398
398                     if (Z_TYPE_P(ctor_args) != IS_ARRAY) {



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

Reply via email to