|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38093 PDO sqlite module crashes
Submitted: 2006-07-13 11:43 UTC Modified: 2010-12-20 12:15 UTC
From: bugs at kilimajer dot net Assigned:
Status: No Feedback Package: SQLite related
PHP Version: 5.1.4 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: bugs at kilimajer dot net
New email:
PHP Version: OS:


 [2006-07-13 11:43 UTC] bugs at kilimajer dot net
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) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-13 12:06 UTC]
Please try using this CVS snapshot:
For Windows:

Works fine here.
 [2006-07-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-12-20 12:15 UTC]
-Package: Tidy +Package: SQLite related
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 20 03:03:36 2021 UTC