Hello,
I have recompiled libsqliteodbc with debugging symbols, here is a better
stack trace:
$ gdb ./sqlite-odbc
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
[...]
(gdb) run
Starting program: /home/enrico/lavori/arpa/dballe/sqlite-odbc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6ab1537 in sqlite3_stricmp () from
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
(gdb) where
#0 0x00007ffff6ab1537 in sqlite3_stricmp () from
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
#1 0x00007ffff6ab2485 in ?? () from /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
#2 0x00007ffff6ab3cf6 in ?? () from /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
#3 0x00007ffff6b1e188 in sqlite3_table_column_metadata () from
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
#4 0x00007ffff6d77ec6 in s3stmt_addmeta (s3stmt=0x62d588, col=0, d=0x616708,
ci=0x62aa08) at sqlite3odbc.c:3863
#5 0x00007ffff6d8f53d in setupdyncols (s=0x629448, s3stmt=0x62d588,
ncolsp=0x7fffffffda04) at sqlite3odbc.c:16380
#6 0x00007ffff6d8f979 in drvprepare (stmt=0x629448, query=0x400ba8 "SELECT
COUNT(*) FROM sqlite_master WHERE type='table' AND name=?",
queryLen=-3) at sqlite3odbc.c:16488
#7 0x00007ffff6d90562 in SQLPrepare (stmt=0x629448, query=0x400ba8 "SELECT
COUNT(*) FROM sqlite_master WHERE type='table' AND name=?",
queryLen=-3) at sqlite3odbc.c:16766
#8 0x00007ffff7b94481 in SQLPrepare () from
/usr/lib/x86_64-linux-gnu/libodbc.so.2
#9 0x0000000000400957 in main () at sqlite-odbc.c:30
(gdb) up
#1 0x00007ffff6ab2485 in ?? () from /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
(gdb)
#2 0x00007ffff6ab3cf6 in ?? () from /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
(gdb)
#3 0x00007ffff6b1e188 in sqlite3_table_column_metadata () from
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
(gdb)
#4 0x00007ffff6d77ec6 in s3stmt_addmeta (s3stmt=0x62d588, col=0, d=0x616708,
ci=0x62aa08) at sqlite3odbc.c:3863
3863 sqlite3_table_column_metadata(d->sqlite, dn, tn, cn,
(gdb) list
3858 const char *dn, *tn, *cn, *dummy1, *dummy2;
3859
3860 dn = sqlite3_column_database_name(s3stmt, col);
3861 tn = sqlite3_column_table_name(s3stmt, col);
3862 cn = sqlite3_column_origin_name(s3stmt, col);
3863 sqlite3_table_column_metadata(d->sqlite, dn, tn, cn,
3864 &dummy1, &dummy2,
3865 &nn, &pk, &ai);
3866 ci->autoinc = ai ? SQL_TRUE: SQL_FALSE;
3867 ci->notnull = nn ? SQL_NO_NULLS : SQL_NULLABLE;
(gdb) p dn
$1 = 0x0
(gdb) p tn
$2 = 0x0
(gdb) p cn
$3 = 0x0
I unfortunately have no idea what s3stmt_addmeta or the caller
setupdyncols are supposed to do, so I'll stop here.
Enrico
--
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <[email protected]>
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]