SQLite Forum

Three testcases causing different Assertion Failed
Login
# bt of PoC No.2

```
sqlite3: sqlite3.c:132653: int sqlite3InitOne(sqlite3 *, int, char **, u32): Assertion `(db->mDbFlags & DBFLAG_SchemaKnownOk)==0' failed.

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007fe4e4077859 in __GI_abort () at abort.c:79
#2  0x00007fe4e4077729 in __assert_fail_base (fmt=0x7fe4e420d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x29b100 <str> "(db->mDbFlags & DBFLAG_SchemaKnownOk)==0", 
    file=0x263b40 <str.1> "sqlite3.c", line=132653, function=<optimized out>) at assert.c:92
#3  0x00007fe4e4088f36 in __GI___assert_fail (assertion=0x29b100 <str> "(db->mDbFlags & DBFLAG_SchemaKnownOk)==0", file=0x263b40 <str.1> "sqlite3.c", line=132653, 
    function=0x29b160 <__PRETTY_FUNCTION__.sqlite3InitOne> "int sqlite3InitOne(sqlite3 *, int, char **, u32)") at assert.c:101
#4  0x000000000072d0ef in sqlite3InitOne (db=0x617000000080, iDb=0, pzErrMsg=0x7fff1508dc28, mFlags=0) at sqlite3.c:132653
#5  0x000000000072c8cb in sqlite3Init (db=0x617000000080, pzErrMsg=0x7fff1508dc28) at sqlite3.c:132889
#6  0x0000000000728df7 in sqlite3ReadSchema (pParse=0x7fff1508dc20) at sqlite3.c:132915
#7  0x0000000000635b3a in sqlite3StartTable (pParse=0x7fff1508dc20, pName1=0x7fff1508d180, pName2=0x7fff1508d198, isTemp=0, isView=0, isVirtual=1, noErr=0) at sqlite3.c:114531
#8  0x00000000006b9ab1 in sqlite3VtabBeginParse (pParse=0x7fff1508dc20, pName1=0x7fff1508d180, pName2=0x7fff1508d198, pModuleName=0x7fff1508d1c8, ifNotExists=0) at sqlite3.c:145099
#9  0x000000000062af94 in yy_reduce (yypParser=0x7fff1508d0f0, yyruleno=295, yyLookahead=1, yyLookaheadToken=..., pParse=0x7fff1508dc20) at sqlite3.c:164978
#10 0x000000000060dc64 in sqlite3Parser (yyp=0x7fff1508d0f0, yymajor=1, yyminor=...) at sqlite3.c:165425
#11 0x0000000000548600 in sqlite3RunParser (pParse=0x7fff1508dc20, zSql=0x60c00000012a ";", pzErrMsg=0x7fff1508dc00) at sqlite3.c:166721
#12 0x00000000005354c0 in sqlite3Prepare (db=0x617000000080, zSql=0x60c000000100 "CREATE VIRTUAL TABLE temp.'ia1' USING 'ia';", nBytes=-1, prepFlags=128, pReprepare=0x0, 
    ppStmt=0x7fff1508dfc0, pzTail=0x7fff1508dfe0) at sqlite3.c:133175
#13 0x0000000000533b0a in sqlite3LockAndPrepare (db=0x617000000080, zSql=0x60c000000100 "CREATE VIRTUAL TABLE temp.'ia1' USING 'ia';", nBytes=-1, prepFlags=128, pOld=0x0, 
    ppStmt=0x7fff1508dfc0, pzTail=0x7fff1508dfe0) at sqlite3.c:133250
#14 0x000000000052b98f in sqlite3_prepare_v2 (db=0x617000000080, zSql=0x60c000000100 "CREATE VIRTUAL TABLE temp.'ia1' USING 'ia';", nBytes=-1, ppStmt=0x7fff1508dfc0, pzTail=0x7fff1508dfe0)
    at sqlite3.c:133336
#15 0x00000000004a9d3f in shell_exec (pArg=0x7fff1508eba0, zSql=0x60c000000100 "CREATE VIRTUAL TABLE temp.'ia1' USING 'ia';", pzErrMsg=0x7fff1508e140) at shell.c:14642
#16 0x00000000004b10ee in runOneSqlLine (p=0x7fff1508eba0, zSql=0x60c000000100 "CREATE VIRTUAL TABLE temp.'ia1' USING 'ia';", in=0x0, startline=10) at shell.c:21957
#17 0x00000000004ad765 in process_input (p=0x7fff1508eba0) at shell.c:22067
#18 0x0000000000479bd8 in main (argc=1, argv=0x7fff15090108) at shell.c:22892
```