php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48679 SQLiteUnbuffered::count() SIGSEGV
Submitted: 2009-06-24 18:43 UTC Modified: 2009-06-25 00:16 UTC
From: felipe@php.net Assigned:
Status: Closed Package: SQLite related
PHP Version: 5.3CVS-2009-06-24 (CVS) 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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: felipe@php.net
New email:
PHP Version: OS:

 

 [2009-06-24 18:43 UTC] felipe@php.net
Description:
------------
See below:

Reproduce code:
---------------
$x = new sqliteunbuffered;
count($x);

Expected result:
----------------
No SIGSEGV.

Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7c696c0 (LWP 30884)]
0x082783ca in sqlite_count_elements (object=0x9a31940, count=0x9a325e0, tsrm_ls=0x98f1050) at /home/felipe/dev/php5/ext/sqlite/sqlite.c:2822
2822		if (obj->u.res->buffered) {
(gdb) bt
#0  0x082783ca in sqlite_count_elements (object=0x9a31940, count=0x9a325e0, tsrm_ls=0x98f1050) at /home/felipe/dev/php5/ext/sqlite/sqlite.c:2822
#1  0x082ca6ab in zif_count (ht=1, return_value=0x9a325e0, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0, tsrm_ls=0x98f1050)
    at /home/felipe/dev/php5/ext/standard/array.c:323
#2  0x08436a24 in zend_do_fcall_common_helper_SPEC (execute_data=0x9a60a94, tsrm_ls=0x98f1050) at /home/felipe/dev/php5/Zend/zend_vm_execute.h:313
#3  0x0843cb8b in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x9a60a94, tsrm_ls=0x98f1050) at /home/felipe/dev/php5/Zend/zend_vm_execute.h:1601
#4  0x084357eb in execute (op_array=0x9a31fc8, tsrm_ls=0x98f1050) at /home/felipe/dev/php5/Zend/zend_vm_execute.h:104
#5  0x083f4ef4 in zend_eval_stringl (str=0xbfef97f4 "$x = new sqliteunbuffered; count($x);", str_len=37, retval_ptr=0x0, 
    string_name=0x87a08b4 "Command line code", tsrm_ls=0x98f1050) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1159
#6  0x083f517b in zend_eval_stringl_ex (str=0xbfef97f4 "$x = new sqliteunbuffered; count($x);", str_len=37, retval_ptr=0x0, 
    string_name=0x87a08b4 "Command line code", handle_exceptions=1, tsrm_ls=0x98f1050) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1200
#7  0x083f522f in zend_eval_string_ex (str=0xbfef97f4 "$x = new sqliteunbuffered; count($x);", retval_ptr=0x0, string_name=0x87a08b4 "Command line code", 
    handle_exceptions=1, tsrm_ls=0x98f1050) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1211
#8  0x084e6ca2 in main (argc=3, argv=0xbfef7d94) at /home/felipe/dev/php5/sapi/cli/php_cli.c:1227


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-06-25 00:16 UTC] scottmac@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Is in HEAD and 5.2, will go in 5.3 once it thaws...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 14:01:27 2024 UTC