Fuzz introspector
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzzer details

Fuzzer: ossfuzz

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 10986 70.6%
gold [1:9] 114 0.73%
yellow [10:29] 33 0.21%
greenyellow [30:49] 34 0.21%
lawngreen 50+ 4375 28.1%
All colors 15542 100

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
42936 404898 178 :

['sqlite3VdbeIdxRowid', 'sqlite3IntFloatCompare', 'sqlite3BtreeNext', 'sqlite3BtreeOpen', 'sqlite3BtreeLockTable', 'sqlite3VdbeMemAboutToChange', 'sqlite3JournalModename', 'sqlite3VdbeMemFinalize', 'sqlite3BtreeMaxPageCount', 'sqlite3UnlinkAndDeleteTrigger', 'sqlite3BtreeCursorHasHint', 'applyNumericAffinity', 'sqlite3VdbeMemClearAndResize', 'sqlite3BtreeIntegrityCheck', 'sqlite3PagerFilename', 'sqlite3VdbeFrameRestore', 'sqlite3VdbeOneByteSerialTypeLen', 'sqlite3VdbeMemMove', 'sqlite3SubInt64', 'sqlite3SchemaClear', 'sqlite3MemCompare', 'sqlite3AnalysisLoad', 'sqlite3VdbeSorterRowkey', 'vdbeColumnFromOverflow', 'sqlite3RowSetNext', 'sqlite3MPrintf', 'sqlite3CloseSavepoints', 'sqlite3BtreeIntegerKey', 'sqlite3BtreeFirst', 'sqlite3BtreeHoldsMutex', 'sqlite3BtreeTableMoveto', 'filterHash', 'sqlite3UnlinkAndDeleteTable', 'sqlite3VdbeIdxKeyCompare', 'sqlite3LogEst', 'sqlite3VdbeMemMakeWriteable', 'sqlite3_free', 'sqlite3Strlen30', 'sqlite3RootPageMoved', 'sqlite3UnlinkAndDeleteIndex', 'sqlite3VdbeMemAggValue', 'sqlite3VdbeRealValue', 'sqlite3VdbeAllocUnpackedRecord', 'sqlite3BtreeEof', 'sqlite3BtreeClearCursor', 'sqlite3VdbeRecordUnpack', 'sqlite3VdbeSorterNext', 'test_trace_breakpoint', 'sqlite3PagerSetJournalMode', 'sqlite3BtreeCursorIsValid', 'sqlite3VdbeRecordCompareWithSkip', 'sqlite3VdbeMemIntegerify', 'sqlite3VdbeIntValue', 'sqlite3VdbeMemSetNull', 'sqlite3VarintLen', 'sqlite3InitOne', 'sqlite3VdbeChangeEncoding', 'sqlite3BtreeIndexMoveto', 'sqlite3DbStrDup', 'sqlite3Checkpoint', 'sqlite3VdbeMemSetStr', 'sqlite3PagerCloseWal', 'sqlite3VdbeSerialGet', 'sqlite3BtreeBeginTrans', 'sqlite3_malloc64', 'sqlite3VdbeFinishMoveto', 'sqlite3VdbeMemGrow', 'sqlite3SchemaMutexHeld', 'sqlite3BtreeIncrVacuum', 'sqlite3VdbeMemInit', 'sqlite3VdbeMemExpandBlob', 'sqlite3IsNaN', 'sqlite3VdbeSorterWrite', 'sqlite3PagerWalSupported', 'sqlite3BtreeLast', 'sqlite3VtabSavepoint', 'sqlite3VtabUnlock', 'sqlite3BtreeCount', 'sqlite3DbFreeNN', 'sqlite3VdbeMemStringify', 'sqlite3VdbeSorterCompare', 'sqlite3VtabImportErrmsg', 'sqlite3DeleteTable', 'sqlite3AddInt64', 'sqlite3VdbeExpandSql', 'sqlite3BtreeCursorHasMoved', 'sqlite3VdbeSorterReset', 'sqlite3BtreeDropTable', 'sqlite3MulInt64', 'sqlite3VdbeMemFromBtreeZeroOffset', 'sqlite3VdbeFreeCursor', 'sqlite3VdbeRegisterDump', 'sqlite3BtreeUpdateMeta', 'sqlite3RunVacuum', 'sqlite3RowSetTest', 'sqlite3VdbeMemCopy', 'sqlite3VdbeSetChanges', 'sqlite3VdbeSorterInit', 'sqlite3PagerGetJournalMode', 'sqlite3BtreeCursorUnpin', 'sqlite3ResetAllSchemasOfConnection', 'sqlite3ExpirePreparedStatements', 'vdbeMemTypeName', 'registerTrace', 'sqlite3_exec', 'sqlite3_value_type', 'sqlite3VdbeSerialTypeLen', 'sqlite3BtreeTripAllCursors', 'sqlite3BtreeClearTable', 'sqlite3BtreeSetVersion', 'sqlite3VdbeAssertAbortable', 'sqlite3BtreeFakeValidCursor', 'sqlite3BtreeCursorHintFlags', 'sqlite3BtreePager', 'sqlite3VdbeMemShallowCopy', 'sqlite3BtreeDelete', 'sqlite3BtreeCursorPin', 'applyAffinity', 'sqlite3BtreeTxnState', 'sqlite3FkClearTriggerCache', 'sqlite3BtreeBeginStmt', 'sqlite3VtabBegin', 'sqlite3BtreeClearTableOfCursor', 'sqlite3DbFree', 'sqlite3DebugPrintf', 'sqlite3BtreeRowCountEst', 'sqlite3BtreePayloadFetch', 'sqlite3StrICmp', 'sqlite3VdbeMemSetInt64', 'sqlite3VdbeMemSetPointer', 'numericType', 'sqlite3RowSetInsert', 'sqlite3BtreeLastPage', 'sqlite3BtreeSavepoint', 'sqlite3BtreeTransferRow', 'sqlite3VdbeCheckFk', 'sqlite3DbMallocRawNN', 'sqlite3_randomness', 'sqlite3VtabLock', 'sqlite3VdbeDeleteAuxData', 'sqlite3VdbeMemRelease', 'sqlite3VdbeMemTooBig', 'sqlite3VdbePrintOp', 'sqlite3ReportError', 'sqlite3BtreeInsert', 'sqlite3VdbeMemReleaseMalloc', 'sqlite3WritableSchema', 'sqlite3BtreePrevious', 'sqlite3BtreeCursorIsValidNN', 'sqlite3RollbackAll', 'checkSavepointCount', 'sqlite3VdbeMemRealify', 'sqlite3_value_text', 'sqlite3BtreeCreateTable', 'sqlite3PutVarint', 'sqlite3GetVarint32', 'sqlite3VdbeHandleMovedCursor', 'sqlite3BtreeCursor', 'sqlite3BtreeGetMeta', 'sqlite3VdbeMemIsRowSet', 'sqlite3VListNumToName', 'allocateCursor', 'sqlite3PagerOkToChangeJournalMode', 'sqlite3DbMallocZero', 'sqlite3VdbeMemSetZeroBlob', 'sqlite3VtabCallDestroy', 'out2Prerelease', 'sqlite3VdbeBooleanValue', 'sqlite3VtabCallCreate', 'sqlite3VdbeCursorRestore', 'sqlite3BtreeClose', 'sqlite3VdbeCheckMemInvariants', 'sqlite3VdbeMemCast', 'strncmp', 'sqlite3VdbeSorterRewind', 'sqlite3VdbeIncrWriteCounter', 'sqlite3VdbeMemSetRowSet', 'sqlite3BtreePayloadSize']

42936 445846 sqlite3VdbeExec call site: 07629 /src/sqlite3/bld/sqlite3.c:99973
19534 22036 3 :

['sqlite3UpsertAnalyzeTarget', 'sqlite3ErrorMsg', 'sqlite3HasExplicitNulls']

20368 292225 sqlite3Insert call site: 14008 /src/sqlite3/bld/sqlite3.c:132178
19520 19520 1 :

['windowFullScan']

19520 20431 windowReturnOneRow call site: 11144 /src/sqlite3/bld/sqlite3.c:168385
19511 19511 1 :

['sqlite3MaterializeView']

20345 187602 sqlite3DeleteFrom call site: 13029 /src/sqlite3/bld/sqlite3.c:126275
3684 3684 1 :

['windowCodeRangeTest']

3684 81761 windowCodeOp call site: 11276 /src/sqlite3/bld/sqlite3.c:168718
2692 2692 1 :

['sqlite3BtreeSetVersion']

2700 15949 sqlite3_backup_step call site: 07469 /src/sqlite3/bld/sqlite3.c:81480
1662 1741 2 :

['sqlite3Error', 'sqlite3MisuseError']

1662 1746 sqlite3_declare_vtab call site: 00000 /src/sqlite3/bld/sqlite3.c:153766
1470 1470 1 :

['sqlite3BtreeNewDb']

4170 19150 sqlite3_backup_step call site: 07460 /src/sqlite3/bld/sqlite3.c:81469
1276 1276 1 :

['pagerWriteLargeSector']

1276 1276 sqlite3PagerWrite call site: 01110 /src/sqlite3/bld/sqlite3.c:62535
1246 1246 1 :

['sqlite3TreeViewExpr']

1246 1246 exprAnalyze call site: 09266 /src/sqlite3/bld/sqlite3.c:158849
1228 1230 2 :

['sqlite3VdbeMakeLabel', 'windowCodeRangeTest']

1228 344254 sqlite3WindowCodeStep call site: 11359 /src/sqlite3/bld/sqlite3.c:169476
1096 4257 5 :

['jsonNodeSize', 'jsonLabelCompare', 'jsonLookupStep', 'jsonLookupAppend', 'jsonParseAddNode']

1096 4257 jsonLookupStep call site: 00000 /src/sqlite3/bld/sqlite3.c:203761

Runtime coverage analysis

Covered functions
1996
Functions that are reachable but not covered
228
Reachable functions
1944
Percentage of reachable functions covered
88.27%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
test/ossfuzz.c 5
bld/sqlite3.c 1885

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination, yield a high code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
jsonExtractFunc /src/sqlite3/bld/sqlite3.c 3 ['struct.sqlite3_context *', 'int', 'struct.sqlite3_value **'] 43 0 344 56 21 213 0 1671 547
timediffFunc /src/sqlite3/bld/sqlite3.c 3 ['struct.sqlite3_context *', 'int', 'struct.sqlite3_value **'] 40 0 364 47 17 174 0 1315 218
unixOpen /src/sqlite3/bld/sqlite3.c 5 ['struct.sqlite3_vfs *', 'char *', 'struct.sqlite3_file *', 'int', 'int *'] 38 0 1098 226 64 169 0 1268 175
renameColumnFunc /src/sqlite3/bld/sqlite3.c 3 ['struct.sqlite3_context *', 'int', 'struct.sqlite3_value **'] 66 0 813 118 39 1935 0 19685 161
sqlite3_test_control /src/sqlite3/bld/sqlite3.c 1 ['int'] 44 0 1553 204 53 258 0 1749 126
unixShmMap /src/sqlite3/bld/sqlite3.c 5 ['struct.sqlite3_file *', 'int', 'int', 'int', 'char **'] 37 0 579 83 25 164 0 1202 92
pcache1Fetch /src/sqlite3/bld/sqlite3.c 3 ['struct.sqlite3_pcache *', 'int', 'int'] 8 0 147 30 6 32 0 156 67

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
80.0%
2089 / 2607
Cyclomatic complexity statically reachable by fuzzers
89.0%
21134 / 23762

All functions overview

If you implement fuzzers for these functions, the status of all functions in the project will be:

Func name Functions filename Args Function call depth Reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
sqlite3_backup_finish 36 19 52.77% ['ossfuzz']
sqlite3_vtab_config 39 21 53.84% []
sqlite3_config 154 16 10.38% ['ossfuzz']
unixWrite 37 14 37.83% []
unixFileControl 80 31 38.75% []
fcntlSizeHint 38 14 36.84% []
sqlite3BtreeOpen 220 102 46.36% ['ossfuzz']
syncJournal 64 15 23.43% ['ossfuzz']
sqlite3WalClose 39 5 12.82% ['ossfuzz']
sqlite3PagerSharedLock 106 17 16.03% ['ossfuzz']
pager_incr_changecounter 41 13 31.70% ['ossfuzz']
writeSuperJournal 40 14 35.0% ['ossfuzz']
vdbeCommit 162 53 32.71% ['ossfuzz']
sqlite3VtabSavepoint 36 7 19.44% ['ossfuzz']
hasSharedCacheTableLock 38 9 23.68% ['ossfuzz']
sqlite3VtabBegin 32 7 21.87% ['ossfuzz']
exprCodeInlineFunction 78 32 41.02% ['ossfuzz']
sqlite3VtabOverloadFunction 45 19 42.22% ['ossfuzz']
convertCompoundSelectToSubquery 50 21 42.0% ['ossfuzz']
agginfoPersistExprCb 34 6 17.64% ['ossfuzz']
countOfViewOptimization 62 21 33.87% ['ossfuzz']
sqlite3WindowCodeInit 57 20 35.08% ['ossfuzz']
whereLoopAddVirtual 97 40 41.23% ['ossfuzz']
whereRangeVectorLen 34 7 20.58% ['ossfuzz']
filterPullDown 39 6 15.38% ['ossfuzz']
sqlite3WindowCodeStep 264 133 50.37% ['ossfuzz']
windowReturnOneRow 65 18 27.69% ['ossfuzz']
windowAggStep 88 42 47.72% ['ossfuzz']
windowCodeOp 117 64 54.70% ['ossfuzz']
sqlite3ParseUri 167 31 18.56% ['ossfuzz']
jsonLookupStep 171 42 24.56% []
jsonRenderNode 113 52 46.01% []
sqlite3AutoLoadExtensions 33 9 27.27% ['ossfuzz']
createCollation 44 20 45.45% ['ossfuzz']