Edit report at http://bugs.php.net/bug.php?id=53626&edit=1
ID: 53626 User updated by: bionoren at letu dot edu Reported by: bionoren at letu dot edu Summary: Segmentation Fault -Status: Feedback +Status: Open Type: Bug Package: Reproducible crash Operating System: Mac OS X 10.6.5 PHP Version: 5.3.4 Block user comment: N Private report: N New Comment: <?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"; ?> Previous Comments: ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ [2010-12-28 23:57:04] bionoren at letu dot edu Description: ------------ ./configure '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/private/etc' '--with-apxs2=/usr/sbin/apxs' '--enable-cli' '--with-config-file-path=/etc' '--with-libxml-dir=/usr' '--with-openssl=/usr' '--with-kerberos=/usr' '--with-zlib=/usr' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--with-curl=/usr' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--enable-gd-native-ttf' '--with-ldap=/usr' '--with-ldap-sasl=/usr' '--enable-mbstring' '--enable-mbregex' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mysql-sock=/var/mysql/mysql.sock' '--with-iodbc=/usr' '--enable-shmop' '--with-snmp=/usr' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-xsl=/usr' '--enable-zend-multibyte' '--enable-zip' '--with-pcre-regex' --disable-cgi --enable-debug --with-freetype-dir=/usr/local --with-mcrypt Expected result: ---------------- An error message describing whatever bad situation I created for PHP Actual result: -------------- Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: 13 at address: 0x0000000000000000 0x00000001015bed85 in zend_llist_del_element (l=0x1022aade8, element=0x102099818, compare=0x101095ad6 <php_sqlite3_compare_stmt_free>) at /downloads/php/php-5.3.4/Zend/zend_llist.c:97 97 next = current->next; (gdb) bt #0 0x00000001015bed85 in zend_llist_del_element (l=0x1022aade8, element=0x102099818, compare=0x101095ad6 <php_sqlite3_compare_stmt_free>) at /downloads/php/php-5.3.4/Zend/zend_llist.c:97 #1 0x0000000101095d6d in php_sqlite3_stmt_object_free_storage (object=0x1023132b0) at /downloads/php/php-5.3.4/ext/sqlite3/sqlite3.c:1936 #2 0x00000001015fe9fd in zend_objects_store_free_object_storage (objects=0x101c95e38) at /downloads/php/php-5.3.4/Zend/zend_objects_API.c:92 #3 0x00000001015b8ff1 in shutdown_executor () at /downloads/php/php-5.3.4/Zend/zend_execute_API.c:302 #4 0x00000001015cc9f3 in zend_deactivate () at /downloads/php/php-5.3.4/Zend/zend.c:890 #5 0x00000001015493d4 in php_request_shutdown (dummy=0x0) at /downloads/php/php-5.3.4/main/main.c:1633 #6 0x00000001016b948b in php_apache_request_dtor (r=0x1009b1ea8) at /downloads/php/php-5.3.4/sapi/apache2handler/sapi_apache2.c:509 #7 0x00000001016b9c63 in php_handler (r=0x1009b1ea8) at /downloads/php/php-5.3.4/sapi/apache2handler/sapi_apache2.c:681 #8 0x00000001000021db in ap_run_handler () #9 0x0000000100002aba in ap_invoke_handler () #10 0x000000010002f738 in ap_process_request () #11 0x000000010002bfa9 in ap_process_http_connection () #12 0x0000000100013737 in ap_run_process_connection () #13 0x0000000100013bd1 in ap_process_connection () #14 0x00000001000363f2 in child_main () #15 0x00000001000364dc in make_child () #16 0x0000000100036aaf in ap_mpm_run () #17 0x000000010000a821 in main () (gdb) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53626&edit=1