php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bugs at kilimajer dot net
New email:
PHP Version: OS:

 

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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-13 12:06 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

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] jani@php.net
-Package: Tidy +Package: SQLite related
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC