Edit report at https://bugs.php.net/bug.php?id=53626&edit=1
ID: 53626 User updated by: bion at drewcrawfordapps dot com Reported by: bion at drewcrawfordapps dot com Summary: SQLite3 - Segmentation Fault on shutdown Status: Verified Type: Bug Package: Reproducible crash -Operating System: Mac OS X 10.6.6 +Operating System: Mac OS X 10.7.1 -PHP Version: 5.3.5 +PHP Version: 5.3.8 Block user comment: N Private report: N New Comment: This bug is still reproducible, and in fact has regressed, since I no longer get a helpful console error message, but a generic crash report. What are the chances of getting this fixed? Previous Comments: ------------------------------------------------------------------------ [2011-06-05 20:28:48] fel...@php.net This is due the destructor order. ------------------------------------------------------------------------ [2011-03-08 20:15:05] bionoren at letu dot edu It's more helpful. I get the following messages in the Apache error log: test/index.php(14) : Warning - SQLite3::query() [<a href='sqlite3.query'>sqlite3.query</a>]: table test already exists test/index.php(3) : Catchable fatal error - Argument 1 passed to test::__construct() must be an array, boolean given, called in test/index.php on line 9 and defined [Tue Mar 08 13:11:41 2011] [notice] child pid 26396 exit signal Segmentation fault (11) Here's the stack trace: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 0x00000001015d0831 in zend_llist_del_element (l=0x10071c0f0, element=0x10208c258, compare=0x10109f549 <php_sqlite3_compare_stmt_free>) at /Users/bion/Downloads/php5.3-201103081730/Zend/zend_llist.c:97 97 next = current->next; ------------------------------------------------------------------------ [2011-03-08 18:00:04] fel...@php.net Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2010-12-29 01:07:56] bionoren at letu dot edu <?php class test { public function __construct(array $values) { print_r($values); } public static function getInstance($db) { $result = $db->query("SELECT * from test"); return new test($result->fetchArray(SQLITE3_ASSOC)); } } $db = new SQLite3("test.sqlite", SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE); $db->query("CREATE TABLE test (foo, bar)"); test::getInstance($db); print "done"; ?> ------------------------------------------------------------------------ [2010-12-29 00:02:51] fel...@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=53626 -- Edit this bug report at https://bugs.php.net/bug.php?id=53626&edit=1