|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-01-19 05:43 UTC] php at diptyque dot net
Description:
------------
Changing the value of the ini setting sqlite.assoc_case to
1 or 2 makes php crash.
Tested with PHP 4.4.2 w/ SQLite 1.0.3 -- libsqlite upgraded
to version 2.8.17
Reproduce code:
---------------
<?php
if (is_file('test.db')) {
unlink ('test.db');
}
ini_set('sqlite.assoc_case', 1); // or 2
$query = <<<END_OF_SQL
CREATE TABLE authors (
id INTEGER PRIMARY KEY,
name VARCHAR(100),
email VARCHAR(150)
);
END_OF_SQL;
$db = sqlite_open('test.db');
sqlite_query($db, $query);
$query = 'PRAGMA table_info(authors)';
$result = sqlite_query($db, $query);
?>
Expected result:
----------------
Not a Segmentation fault anyway. I guess this is the same
bug reported at http://bugs.php.net/bug.php?id=34884
Actual result:
--------------
gdb php php.core
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public
License, and you are
welcome to change it and/or distribute copies of it under
certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show
warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
Core was generated by `php'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from
/usr/local/lib/libc-client4.so.8...done.
Reading symbols from
/usr/local/lib/mysql/libmysqlclient.so.12...done.
Reading symbols from /usr/lib/libpam.so.1...done.
Reading symbols from /usr/local/lib/libgd.so.2...done.
Reading symbols from
/usr/local/lib/libfreetype.so.7...done.
Reading symbols from /usr/local/lib/libpng.so.5...done.
Reading symbols from /usr/lib/libz.so...done.
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Reading symbols from /usr/lib/libbz2.so.1...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/local/lib/libcurl.so.2...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/lib/libssl.so.2...done.
Reading symbols from /usr/lib/libcrypto.so.2...done.
Reading symbols from
/usr/local/Zend/lib/ZendExtensionManager.so...done.
Reading symbols from
/usr/local/www/lib/php/extensions/no-debug-non-zts-20020429
/sqlite.so...done.
Reading symbols from
/usr/local/Zend/lib/Optimizer-2.5.10/php-4.4.x/ZendOptimize
r.so...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0 php_sqlite_fetch (rres=0x843be4c) at
/usr/local/src/SQLite-1.0.3/sqlite.c:63
63 *s = toupper(*s);
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Additional backtrace info: (gdb) bt #0 php_sqlite_fetch (rres=0x843be8c) at /usr/local/src/SQLite-1.0.3/sqlite.c:63 #1 0x287447bf in sqlite_query (db=0x843e20c, sql=0x843bacc "PRAGMA table_info(authors)", sql_len=26, mode=3, buffered=1, return_value=0x843ad0c, rres=0x843be8c) at /usr/local/src/SQLite-1.0.3/sqlite.c:1033 #2 0x28744aa4 in zif_sqlite_query (ht=2, return_value=0x843ad0c, this_ptr=0x0, return_value_used=1) at /usr/local/src/SQLite-1.0.3/sqlite.c:1117 #3 0x287abac1 in zend_oe () from /usr/local/Zend/lib/Optimizer-2.5.10/php-4.4.x/ZendOptimize r.so #4 0x287a93a6 in zend_oe () from /usr/local/Zend/lib/Optimizer-2.5.10/php-4.4.x/ZendOptimize r.so #5 0x814f007 in php_execute_script (primary_file=0xbfbffac4) at /usr/local/src/php-4.4.2/main/main.c:1753 #6 0x818d591 in main (argc=3, argv=0xbfbffb2c) at /usr/local/src/php-4.4.2/sapi/cli/php_cli.c:830 #7 0x808469d in _start ()