Skip to content

spmemvfs segfault when issuing DROP TABLE IF EXISTS #1

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Open a database in memory with spmemvfs with a table inside
2. Execute this commands in series:
BEGIN TRANSACTION;
DROP TABLE IF EXISTS tablename;
ROLLBACK TRANSACTION;

3. you get a segfault when it execute the DROP statement:

#0  0xb7cbdb03 in strlen () from /lib/libc.so.6
#1  0xb7cbd835 in strdup () from /lib/libc.so.6
#2  0x084c9d4d in spmemvfsOpen (vfs=0x85a3560, path=0x0, file=0x8ba9fb8, 
    flags=8222, outflags=0x0) at ../../src/thirdparty/spmemvfs/spmemvfs.c:272
#3  0x0846231f in sqlite3OsOpen (pVfs=0x85a3560, zPath=0x0, pFile=0x8ba9fb8, 
    flags=8222, pFlagsOut=0x0) at ../../src/thirdparty/sqlite/sqlite3.c:12253
#4  0x0846ee1d in pagerOpentemp (pPager=0x8ba9ed0, pFile=0x8ba9fb8, 
    vfsFlags=8222) at ../../src/thirdparty/sqlite/sqlite3.c:33556
#5  0x0847076e in openSubJournal (pPager=0x8ba9ed0)
    at ../../src/thirdparty/sqlite/sqlite3.c:35251
#6  0x084716f2 in sqlite3PagerOpenSavepoint (pPager=0x8ba9ed0, nSavepoint=1)
    at ../../src/thirdparty/sqlite/sqlite3.c:36237
#7  0x08476017 in sqlite3BtreeBeginStmt (p=0x8bb22c8, iStatement=1)
    at ../../src/thirdparty/sqlite/sqlite3.c:40868
#8  0x0848967e in sqlite3VdbeExec (p=0x8bb02b0)
    at ../../src/thirdparty/sqlite/sqlite3.c:54971
#9  0x0848441e in sqlite3Step (p=0x8bb02b0)
    at ../../src/thirdparty/sqlite/sqlite3.c:50646
#10 0x084845cc in sqlite3_step (pStmt=0x8bb02b0)
    at ../../src/thirdparty/sqlite/sqlite3.c:50705
#11 0x0824528a in SqliteConnection::executeCommand (this=0x8ba7e38, 
    sqlCommandText=@0xbfead45c) at ../../src/library/Sqlite.cpp:234
#12 ...
...
#17 0x081b074d in main (argc=1, argv=0xbfead734)
    at ../../src/Application.cpp:218

Original issue reported on code.google.com by kunitoki on 18 Mar 2010 at 3:59

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions