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 11337 72.4%
gold [1:9] 96 0.61%
yellow [10:29] 36 0.23%
greenyellow [30:49] 37 0.23%
lawngreen 50+ 4143 26.4%
All colors 15649 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
42290 398946 179 :

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

42290 441275 sqlite3VdbeExec call site: 11365 /src/sqlite3/bld/sqlite3.c:102280
42290 398946 179 :

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

42290 441275 sqlite3VdbeExec call site: 11753 /src/sqlite3/bld/sqlite3.c:102577
8814 8814 1 :

['sqlite3MaterializeView']

9653 111781 sqlite3DeleteFrom call site: 12695 /src/sqlite3/bld/sqlite3.c:129791
8810 8810 1 :

['windowFullScan']

8810 9728 windowReturnOneRow call site: 06065 /src/sqlite3/bld/sqlite3.c:174052
4191 4191 1 :

['windowCodeRangeTest']

4191 50603 windowCodeOp call site: 06199 /src/sqlite3/bld/sqlite3.c:174385
3618 4584 6 :

['jsonBlobAppendNode', 'jsonBlobMakeEditable', 'jsonBlobEdit', 'jsonAfterEditSizeAdjust', 'jsonCreateEditSubstructure', 'jsonParseReset']

3618 4584 jsonLookupStep call site: 00000 /src/sqlite3/bld/sqlite3.c:210792
3618 3677 5 :

['jsonBlobMakeEditable', 'jsonBlobEdit', 'jsonAfterEditSizeAdjust', 'jsonCreateEditSubstructure', 'jsonParseReset']

3618 3677 jsonLookupStep call site: 00000 /src/sqlite3/bld/sqlite3.c:210870
2553 2553 1 :

['sqlite3BtreeSetVersion']

2561 15595 sqlite3_backup_step call site: 11586 /src/sqlite3/bld/sqlite3.c:83556
2147 2147 2 :

['sqlite3ShowWhereTerm', 'sqlite3VdbePrintOp']

2147 2147 sqlite3WhereOpcodeRewriteTrace call site: 05894 /src/sqlite3/bld/sqlite3.c:171768
1718 1736 2 :

['jsonBlobEdit', 'jsonbPayloadSize']

1718 1736 jsonLookupStep call site: 00000 /src/sqlite3/bld/sqlite3.c:210716
1672 1751 2 :

['sqlite3MisuseError', 'sqlite3Error']

1672 1756 sqlite3_declare_vtab call site: 00000 /src/sqlite3/bld/sqlite3.c:158388
1405 3910 3 :

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

2244 186719 sqlite3Insert call site: 13716 /src/sqlite3/bld/sqlite3.c:136117

Runtime coverage analysis

Covered functions
2092
Functions that are reachable but not covered
226
Reachable functions
1892
Percentage of reachable functions covered
88.05%
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 1871

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 ['N/A', 'int', 'N/A'] 42 0 398 72 25 242 0 1951 805
resolveExprStep /src/sqlite3/bld/sqlite3.c 2 ['N/A', 'N/A'] 44 0 2721 467 126 299 1 2563 496
strftimeFunc /src/sqlite3/bld/sqlite3.c 3 ['N/A', 'int', 'N/A'] 40 0 589 93 17 180 0 1348 243
selectExpander /src/sqlite3/bld/sqlite3.c 2 ['N/A', 'N/A'] 70 0 2444 401 115 1873 0 19144 228
unixOpen /src/sqlite3/bld/sqlite3.c 5 ['N/A', 'N/A', 'N/A', 'int', 'N/A'] 38 0 1113 229 65 170 0 1274 176
renameColumnFunc /src/sqlite3/bld/sqlite3.c 3 ['N/A', 'int', 'N/A'] 69 0 806 118 39 1882 0 19058 156
sqlite3_test_control /src/sqlite3/bld/sqlite3.c 1 ['int'] 45 0 1602 218 57 259 0 1780 130

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

Functions statically reachable by fuzzers
77.0%
2062 / 2690
Cyclomatic complexity statically reachable by fuzzers
85.0%
21229 / 24900

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 160 16 10.0% ['ossfuzz']
unixWrite 37 14 37.83% []
unixFileControl 85 31 36.47% []
fcntlSizeHint 38 14 36.84% []
sqlite3PagerSharedLock 106 17 16.03% ['ossfuzz']
pager_incr_changecounter 41 13 31.70% ['ossfuzz']
writeSuperJournal 40 14 35.0% ['ossfuzz']
syncJournal 64 15 23.43% ['ossfuzz']
sqlite3WalClose 39 5 12.82% ['ossfuzz']
vdbeCommit 162 53 32.71% ['ossfuzz']
sqlite3VtabSavepoint 36 7 19.44% ['ossfuzz']
hasSharedCacheTableLock 39 9 23.07% ['ossfuzz']
sqlite3BtreeOpen 220 100 45.45% ['ossfuzz']
sqlite3VtabBegin 32 7 21.87% ['ossfuzz']
exprCodeInlineFunction 78 38 48.71% ['ossfuzz']
sqlite3VtabOverloadFunction 45 19 42.22% ['ossfuzz']
agginfoPersistExprCb 32 6 18.75% []
countOfViewOptimization 67 24 35.82% ['ossfuzz']
sqlite3WindowCodeInit 61 27 44.26% ['ossfuzz']
whereRangeVectorLen 34 7 20.58% ['ossfuzz']
wherePathMatchSubqueryOB 41 21 51.21% ['ossfuzz']
filterPullDown 39 6 15.38% ['ossfuzz']
sqlite3WindowCodeStep 264 138 52.27% ['ossfuzz']
windowAggStep 89 42 47.19% ['ossfuzz']
windowCodeOp 117 64 54.70% ['ossfuzz']
sqlite3ParseUri 167 31 18.56% ['ossfuzz']
jsonRemoveFunc 42 12 28.57% []
jsonEachFilter 92 50 54.34% []
jsonEachNext 63 14 22.22% []
jsonEachColumn 91 44 48.35% []
sqlite3AutoLoadExtensions 33 9 27.27% ['ossfuzz']
createCollation 44 20 45.45% ['ossfuzz']