Error: COMPILER_WARNING (CWE-704): [#def1] sqlite-src-3500200/autosetup/jimsh0.c: scope_hint: In function ‘aio_cmd_gets’ sqlite-src-3500200/autosetup/jimsh0.c:2643:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type # 2643 | nl = memchr(pt + offset, '\n', len - offset); # | ^ # 2641| if (af->readbuf) { # 2642| const char *pt = Jim_GetString(af->readbuf, &len); # 2643|-> nl = memchr(pt + offset, '\n', len - offset); # 2644| if (nl) { # 2645| Error: CPPCHECK_WARNING (CWE-457): [#def2] sqlite-src-3500200/autosetup/jimsh0.c:21498: warning[uninitvar]: Uninitialized variable: params #21496| len += extra; #21497| buf = Jim_Alloc(len + 1); #21498|-> len = snprintf(buf, len + 1, format, params[0], params[1], params[2], params[3], params[4]); #21499| #21500| va_end(args); Error: COMPILER_WARNING (CWE-686): [#def3] sqlite-src-3500200/conftest__.c:1:13: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘ceil’; expected ‘double(double)’ # 1 | extern void ceil(void); # | ^~~~ sqlite-src-3500200/conftest__.c:1:1: note: ‘ceil’ is declared in header ‘<math.h>’ # +++ |+#include <math.h> # 1 | extern void ceil(void); Error: COMPILER_WARNING (CWE-686): [#def4] sqlite-src-3500200/conftest__.c:1:13: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘ceil’; expected ‘double(double)’ Error: COMPILER_WARNING (CWE-686): [#def5] sqlite-src-3500200/conftest__.c:1:13: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘isnan’; expected ‘int()’ # 1 | extern void isnan(void); # | ^~~~~ sqlite-src-3500200/conftest__.c:1:1: note: ‘isnan’ is declared in header ‘<math.h>’ # +++ |+#include <math.h> # 1 | extern void isnan(void); Error: COMPILER_WARNING (CWE-686): [#def6] sqlite-src-3500200/conftest__.c:1:13: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘isnan’; expected ‘int()’ Error: COMPILER_WARNING (CWE-563): [#def7] sqlite-src-3500200/conftest__.c: scope_hint: In function ‘main’ sqlite-src-3500200/conftest__.c:3:8: warning[-Wunused-variable]: unused variable ‘_x’ # 3 | int8_t _x; # | ^~ Error: COMPILER_WARNING (CWE-563): [#def8] sqlite-src-3500200/conftest__.c: scope_hint: In function ‘main’ sqlite-src-3500200/conftest__.c:3:9: warning[-Wunused-variable]: unused variable ‘_x’ # 3 | int16_t _x; # | ^~ Error: COMPILER_WARNING (CWE-563): [#def9] sqlite-src-3500200/conftest__.c: scope_hint: In function ‘main’ sqlite-src-3500200/conftest__.c:3:10: warning[-Wunused-variable]: unused variable ‘_x’ # 3 | intptr_t _x; # | ^~ Error: COMPILER_WARNING (CWE-563): [#def10] sqlite-src-3500200/conftest__.c: scope_hint: In function ‘main’ sqlite-src-3500200/conftest__.c:3:11: warning[-Wunused-variable]: unused variable ‘_x’ # 3 | uintptr_t _x; # | ^~ Error: COMPILER_WARNING: [#def11] [important] sqlite-src-3500200/conftest__.c:3:12: error[error]: size of array ‘_x’ is negative Error: COMPILER_WARNING (CWE-563): [#def12] sqlite-src-3500200/conftest__.c:3:12: warning[-Wunused-variable]: unused variable ‘_x’ Error: COMPILER_WARNING (CWE-704): [#def13] sqlite-src-3500200/sqlite3.c: scope_hint: In function ‘sqlite3ShadowTableName’ sqlite-src-3500200/sqlite3.c:125541:9: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type #125541 | zTail = strrchr(zName, '_'); # | ^ #125539| char *zTail; /* Pointer to the last "_" in zName */ #125540| Table *pTab; /* Table that zName is a shadow of */ #125541|-> zTail = strrchr(zName, '_'); #125542| if( zTail==0 ) return 0; #125543| *zTail = 0; Error: COMPILER_WARNING (CWE-704): [#def14] sqlite-src-3500200/sqlite3.c: scope_hint: In function ‘unistrFunc’ sqlite-src-3500200/sqlite3.c:131560:15: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type #131560 | char *z = strchr(&zIn[i],'\\'); # | ^~~~~~ #131558| i = j = 0; #131559| while( i<nIn ){ #131560|-> char *z = strchr(&zIn[i],'\\'); #131561| if( z==0 ){ #131562| n = nIn - i; Error: COMPILER_WARNING: [#def15] sqlite-src-3500200/sqlite3.c: scope_hint: In function ‘sqlite3Pragma’ sqlite-src-3500200/sqlite3.c:142383:13: warning[-Wunused-but-set-variable=]: variable ‘nIdx’ set but not used #142383 | int nIdx; /* Number of indexes on pTab */ # | ^~~~ #142381| Table *pTab = sqliteHashData(x); /* Current table */ #142382| Index *pIdx; /* An index on pTab */ #142383|-> int nIdx; /* Number of indexes on pTab */ #142384| if( pObjTab && pObjTab!=pTab ) continue; #142385| if( HasRowid(pTab) ) cnt++; Error: COMPILER_WARNING (CWE-704): [#def16] sqlite-src-3500200/sqlite3_analyzer.c: scope_hint: In function ‘sqlite3ShadowTableName’ sqlite-src-3500200/sqlite3_analyzer.c:125565:9: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type #125565 | zTail = strrchr(zName, '_'); # | ^ #125563| char *zTail; /* Pointer to the last "_" in zName */ #125564| Table *pTab; /* Table that zName is a shadow of */ #125565|-> zTail = strrchr(zName, '_'); #125566| if( zTail==0 ) return 0; #125567| *zTail = 0; Error: COMPILER_WARNING (CWE-704): [#def17] sqlite-src-3500200/sqlite3_analyzer.c: scope_hint: In function ‘unistrFunc’ sqlite-src-3500200/sqlite3_analyzer.c:131584:15: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type #131584 | char *z = strchr(&zIn[i],'\\'); # | ^~~~~~ #131582| i = j = 0; #131583| while( i<nIn ){ #131584|-> char *z = strchr(&zIn[i],'\\'); #131585| if( z==0 ){ #131586| n = nIn - i; Error: COMPILER_WARNING: [#def18] sqlite-src-3500200/sqlite3_analyzer.c: scope_hint: In function ‘sqlite3Pragma’ sqlite-src-3500200/sqlite3_analyzer.c:142407:13: warning[-Wunused-but-set-variable=]: variable ‘nIdx’ set but not used #142407 | int nIdx; /* Number of indexes on pTab */ # | ^~~~ #142405| Table *pTab = sqliteHashData(x); /* Current table */ #142406| Index *pIdx; /* An index on pTab */ #142407|-> int nIdx; /* Number of indexes on pTab */ #142408| if( pObjTab && pObjTab!=pTab ) continue; #142409| if( HasRowid(pTab) ) cnt++; Error: COMPILER_WARNING (CWE-1164): [#def19] sqlite-src-3500200/sqlite3_analyzer.c: scope_hint: At top level sqlite-src-3500200/sqlite3_analyzer.c:187960:21: warning[-Wunused-function]: ‘sqlite3ConnectionBlocked’ defined but not used #187960 | SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){ # | ^~~~~~~~~~~~~~~~~~~~~~~~ #187958| ** until connection pBlocker concludes its current transaction. #187959| */ #187960|-> SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){ #187961| enterMutex(); #187962| if( db->pBlockingConnection==0 && db->pUnlockConnection==0 ){ Error: GCC_ANALYZER_WARNING (CWE-476): [#def20] sqlite-src-3500200/src/tclsqlite.c:1708:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘apColName’ sqlite-src-3500200/src/tclsqlite.c:1683:5: branch_true: following ‘true’ branch... sqlite-src-3500200/src/tclsqlite.c:1684:27: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:1690:9: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:1702:7: branch_true: following ‘true’ branch... sqlite-src-3500200/src/tclsqlite.c:1703:28: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:1707:16: branch_true: following ‘true’ branch... sqlite-src-3500200/src/tclsqlite.c:1708:61: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:1708:9: danger: dereference of NULL ‘apColName + (long unsigned int)i * 8’ # 1706| # 1707| for(i=0; i<nCol; i++){ # 1708|-> Tcl_ListObjAppendElement(interp, pColList, apColName[i]); # 1709| } # 1710| Tcl_IncrRefCount(pStar); Error: GCC_ANALYZER_WARNING (CWE-476): [#def21] sqlite-src-3500200/src/tclsqlite.c:1962:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ppHook’ sqlite-src-3500200/src/tclsqlite.c:1998:26: enter_function: entry to ‘DbObjCmd’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:3697:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:3698:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:3698:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:3699:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:3699:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:3700:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:3700:7: branch_false: following ‘false’ branch (when ‘objc <= 3’)... sqlite-src-3500200/src/tclsqlite.c:3705:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:3705:5: branch_false: following ‘false’ branch (when ‘objc != 3’)... sqlite-src-3500200/src/tclsqlite.c:3705:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:3705:5: call_function: calling ‘DbHookCmd’ from ‘DbObjCmd’ # 1960| sqlite3 *db = pDb->db; # 1961| # 1962|-> if( *ppHook ){ # 1963| Tcl_SetObjResult(interp, *ppHook); # 1964| if( pArg ){ Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] sqlite-src-3500200/src/tclsqlite.c:2593:5: warning[-Wanalyzer-malloc-leak]: leak of ‘zSql’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2588:12: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2593:5: throw: if ‘sqlite3_snprintf’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2593:5: danger: ‘zSql’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14) # 2591| return TCL_ERROR; # 2592| } # 2593|-> sqlite3_snprintf(nByte+50, zSql, "INSERT OR %q INTO '%q' VALUES(?", # 2594| zConflict, zTable); # 2595| j = strlen30(zSql); Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] sqlite-src-3500200/src/tclsqlite.c:2621:11: warning[-Wanalyzer-malloc-leak]: leak of ‘azCol’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2604:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2609:10: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2610:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2614:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2615:13: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2616:7: branch_false: following ‘false’ branch (when ‘azCol’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2621:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2621:11: throw: if ‘Tcl_NewObj’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2621:11: danger: ‘azCol’ leaks here; was allocated at [(21)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/20) # 2619| return TCL_ERROR; # 2620| } # 2621|-> str = Tcl_NewObj(); # 2622| Tcl_IncrRefCount(str); # 2623| (void)sqlite3_exec(pDb->db, "BEGIN", 0, 0, 0); Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] sqlite-src-3500200/src/tclsqlite.c:2623:11: warning[-Wanalyzer-malloc-leak]: leak of ‘azCol’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2604:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2609:10: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2610:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2614:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2615:13: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2616:7: branch_false: following ‘false’ branch (when ‘azCol’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2621:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2623:11: throw: if ‘sqlite3_exec’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2623:11: danger: ‘azCol’ leaks here; was allocated at [(21)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/20) # 2621| str = Tcl_NewObj(); # 2622| Tcl_IncrRefCount(str); # 2623|-> (void)sqlite3_exec(pDb->db, "BEGIN", 0, 0, 0); # 2624| zCommit = "COMMIT"; # 2625| while( Tcl_GetsObj(in, str)>=0 ) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] sqlite-src-3500200/src/tclsqlite.c:2625:12: warning[-Wanalyzer-malloc-leak]: leak of ‘azCol’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2604:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2609:10: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2610:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2614:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2615:13: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2616:7: branch_false: following ‘false’ branch (when ‘azCol’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2621:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2625:12: throw: if ‘Tcl_GetsObj’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2625:12: danger: ‘azCol’ leaks here; was allocated at [(21)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/20) # 2623| (void)sqlite3_exec(pDb->db, "BEGIN", 0, 0, 0); # 2624| zCommit = "COMMIT"; # 2625|-> while( Tcl_GetsObj(in, str)>=0 ) { # 2626| char *z; # 2627| Tcl_Size byteLen; Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] sqlite-src-3500200/src/tclsqlite.c:2646:11: warning[-Wanalyzer-malloc-leak]: leak of ‘azCol’ sqlite-src-3500200/src/tclsqlite.c:1998:26: enter_function: entry to ‘DbObjCmd’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2604:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2609:10: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2610:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2614:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2615:13: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2616:7: branch_false: following ‘false’ branch (when ‘azCol’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2621:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2625:12: branch_true: following ‘true’ branch... sqlite-src-3500200/src/tclsqlite.c:2628:7: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:2643:20: call_function: inlined call to ‘strlen30’ from ‘DbObjCmd’ sqlite-src-3500200/src/tclsqlite.c:2645:11: branch_true: following ‘true’ branch (when ‘zErr’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2646:11: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:2646:11: throw: if ‘sqlite3_snprintf’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2646:11: danger: ‘azCol’ leaks here; was allocated at [(22)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/21) # 2644| zErr = malloc(nErr); # 2645| if( zErr ){ # 2646|-> sqlite3_snprintf(nErr, zErr, # 2647| "Error: %s line %d: expected %d columns of data but found %d", # 2648| zFile, lineno, nCol, i+1); Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] sqlite-src-3500200/src/tclsqlite.c:2646:11: warning[-Wanalyzer-malloc-leak]: leak of ‘zErr’ sqlite-src-3500200/src/tclsqlite.c:1998:26: enter_function: entry to ‘DbObjCmd’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2604:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2609:10: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2610:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2614:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2616:7: branch_false: following ‘false’ branch (when ‘azCol’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2621:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2625:12: branch_true: following ‘true’ branch... sqlite-src-3500200/src/tclsqlite.c:2628:7: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:2643:20: call_function: inlined call to ‘strlen30’ from ‘DbObjCmd’ sqlite-src-3500200/src/tclsqlite.c:2644:16: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2645:11: branch_true: following ‘true’ branch (when ‘zErr’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2646:11: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:2646:11: throw: if ‘sqlite3_snprintf’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2646:11: danger: ‘zErr’ leaks here; was allocated at [(29)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/28) # 2644| zErr = malloc(nErr); # 2645| if( zErr ){ # 2646|-> sqlite3_snprintf(nErr, zErr, # 2647| "Error: %s line %d: expected %d columns of data but found %d", # 2648| zFile, lineno, nCol, i+1); Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] sqlite-src-3500200/src/tclsqlite.c:2649:11: warning[-Wanalyzer-malloc-leak]: leak of ‘azCol’ sqlite-src-3500200/src/tclsqlite.c:1998:26: enter_function: entry to ‘DbObjCmd’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2604:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2609:10: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2610:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2614:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2615:13: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2616:7: branch_false: following ‘false’ branch (when ‘azCol’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2621:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2625:12: branch_true: following ‘true’ branch... sqlite-src-3500200/src/tclsqlite.c:2628:7: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:2643:20: call_function: inlined call to ‘strlen30’ from ‘DbObjCmd’ sqlite-src-3500200/src/tclsqlite.c:2645:11: branch_true: following ‘true’ branch (when ‘zErr’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2646:11: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:2649:11: throw: if ‘Tcl_AppendResult’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2649:11: danger: ‘azCol’ leaks here; was allocated at [(22)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/21) # 2647| "Error: %s line %d: expected %d columns of data but found %d", # 2648| zFile, lineno, nCol, i+1); # 2649|-> Tcl_AppendResult(interp, zErr, (char*)0); # 2650| free(zErr); # 2651| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] sqlite-src-3500200/src/tclsqlite.c:2660:11: warning[-Wanalyzer-malloc-leak]: leak of ‘azCol’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2604:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2609:10: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2610:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2614:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2615:13: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2616:7: branch_false: following ‘false’ branch (when ‘azCol’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2621:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2625:12: branch_true: following ‘true’ branch... sqlite-src-3500200/src/tclsqlite.c:2628:7: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:2641:9: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2641:9: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2660:11: throw: if ‘sqlite3_bind_null’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2660:11: danger: ‘azCol’ leaks here; was allocated at [(21)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/20) # 2658| || strlen30(azCol[i])==0 # 2659| ){ # 2660|-> sqlite3_bind_null(pStmt, i+1); # 2661| }else{ # 2662| sqlite3_bind_text(pStmt, i+1, azCol[i], -1, SQLITE_STATIC); Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] sqlite-src-3500200/src/tclsqlite.c:2662:11: warning[-Wanalyzer-malloc-leak]: leak of ‘azCol’ sqlite-src-3500200/src/tclsqlite.c:2042:5: branch_false: following ‘false’ branch (when ‘objc > 1’)... sqlite-src-3500200/src/tclsqlite.c:2046:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2046:5: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2050:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2535:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2540:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2555:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2560:8: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2571:7: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2585:7: branch_false: following ‘false’ branch (when ‘nCol != 0’)... sqlite-src-3500200/src/tclsqlite.c:2588:20: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2589:7: branch_false: following ‘false’ branch (when ‘zSql’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2593:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2604:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2609:10: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2610:7: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2614:5: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2615:13: acquire_memory: allocated here sqlite-src-3500200/src/tclsqlite.c:2616:7: branch_false: following ‘false’ branch (when ‘azCol’ is non-NULL)... sqlite-src-3500200/src/tclsqlite.c:2621:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2625:12: branch_true: following ‘true’ branch... sqlite-src-3500200/src/tclsqlite.c:2628:7: branch_true: ...to here sqlite-src-3500200/src/tclsqlite.c:2641:9: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2641:9: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2657:13: branch_false: following ‘false’ branch... sqlite-src-3500200/src/tclsqlite.c:2662:11: branch_false: ...to here sqlite-src-3500200/src/tclsqlite.c:2662:11: throw: if ‘sqlite3_bind_text’ throws an exception... sqlite-src-3500200/src/tclsqlite.c:2662:11: danger: ‘azCol’ leaks here; was allocated at [(21)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/20) # 2660| sqlite3_bind_null(pStmt, i+1); # 2661| }else{ # 2662|-> sqlite3_bind_text(pStmt, i+1, azCol[i], -1, SQLITE_STATIC); # 2663| } # 2664| } Error: GCC_ANALYZER_WARNING (CWE-686): [#def31] sqlite-src-3500200/tool/lemon.c:188:13: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char *’ for variadic argument 1 of ‘ap’ sqlite-src-3500200/tool/lemon.c:4414:6: enter_function: entry to ‘ReportTable’ sqlite-src-3500200/tool/lemon.c:4442:8: call_function: calling ‘tplt_open’ from ‘ReportTable’ # 186| } # 187| if( c=='d' ){ # 188|-> int v = va_arg(ap, int); # 189| if( v<0 ){ # 190| lemon_addtext(str, &nUsed, "-", 1, iWidth); Error: GCC_ANALYZER_WARNING (CWE-686): [#def32] sqlite-src-3500200/tool/lemon.c:188:13: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘const char *’ for variadic argument 1 of ‘ap’ sqlite-src-3500200/tool/lemon.c:3972:13: enter_function: entry to ‘translate_code’ sqlite-src-3500200/tool/lemon.c:3997:5: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/lemon.c:4000:13: branch_false: ...to here sqlite-src-3500200/tool/lemon.c:4000:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/lemon.c:4011:13: branch_false: ...to here sqlite-src-3500200/tool/lemon.c:4011:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/lemon.c:4014:13: branch_false: ...to here sqlite-src-3500200/tool/lemon.c:4014:11: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/lemon.c:4028:5: branch_false: ...to here sqlite-src-3500200/tool/lemon.c:4028:5: call_function: calling ‘lemon_sprintf’ from ‘translate_code’ with 2 variadic arguments # 186| } # 187| if( c=='d' ){ # 188|-> int v = va_arg(ap, int); # 189| if( v<0 ){ # 190| lemon_addtext(str, &nUsed, "-", 1, iWidth); Error: GCC_ANALYZER_WARNING (CWE-686): [#def33] sqlite-src-3500200/tool/lemon.c:203:9: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘const char *’ but received ‘int’ for variadic argument 1 of ‘ap’ sqlite-src-3500200/tool/lemon.c:4414:6: enter_function: entry to ‘ReportTable’ sqlite-src-3500200/tool/lemon.c:4442:8: call_function: calling ‘tplt_open’ from ‘ReportTable’ # 201| lemon_addtext(str, &nUsed, &zTemp[sizeof(zTemp)-k], k, iWidth); # 202| }else if( c=='s' ){ # 203|-> z = va_arg(ap, const char*); # 204| lemon_addtext(str, &nUsed, z, -1, iWidth); # 205| }else if( c=='.' && memcmp(&zFormat[i], ".*s", 3)==0 ){ Error: GCC_ANALYZER_WARNING (CWE-686): [#def34] sqlite-src-3500200/tool/lemon.c:207:9: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘char *’ for variadic argument 1 of ‘ap’ sqlite-src-3500200/tool/lemon.c:4414:6: enter_function: entry to ‘ReportTable’ sqlite-src-3500200/tool/lemon.c:4442:8: call_function: calling ‘tplt_open’ from ‘ReportTable’ # 205| }else if( c=='.' && memcmp(&zFormat[i], ".*s", 3)==0 ){ # 206| i += 2; # 207|-> k = va_arg(ap, int); # 208| z = va_arg(ap, const char*); # 209| lemon_addtext(str, &nUsed, z, k, iWidth); Error: GCC_ANALYZER_WARNING (CWE-686): [#def35] sqlite-src-3500200/tool/lemon.c:207:9: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int’ but received ‘const char *’ for variadic argument 1 of ‘ap’ sqlite-src-3500200/tool/lemon.c:3972:13: enter_function: entry to ‘translate_code’ sqlite-src-3500200/tool/lemon.c:3997:5: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/lemon.c:4000:13: branch_false: ...to here sqlite-src-3500200/tool/lemon.c:4000:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/lemon.c:4011:13: branch_false: ...to here sqlite-src-3500200/tool/lemon.c:4011:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/lemon.c:4014:13: branch_false: ...to here sqlite-src-3500200/tool/lemon.c:4014:11: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/lemon.c:4028:5: branch_false: ...to here sqlite-src-3500200/tool/lemon.c:4028:5: call_function: calling ‘lemon_sprintf’ from ‘translate_code’ with 2 variadic arguments # 205| }else if( c=='.' && memcmp(&zFormat[i], ".*s", 3)==0 ){ # 206| i += 2; # 207|-> k = va_arg(ap, int); # 208| z = va_arg(ap, const char*); # 209| lemon_addtext(str, &nUsed, z, k, iWidth); Error: GCC_ANALYZER_WARNING (CWE-476): [#def36] sqlite-src-3500200/tool/lemon.c:5554:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘x’ sqlite-src-3500200/tool/lemon.c:5545:16: enter_function: entry to ‘Symbol_new’ sqlite-src-3500200/tool/lemon.c:5550:5: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/lemon.c:5551:27: branch_true: ...to here sqlite-src-3500200/tool/lemon.c:5551:27: call_function: calling ‘lemon_calloc’ from ‘Symbol_new’ sqlite-src-3500200/tool/lemon.c:5551:27: return_function: returning to ‘Symbol_new’ from ‘lemon_calloc’ sqlite-src-3500200/tool/lemon.c:5553:16: call_function: calling ‘Strsafe’ from ‘Symbol_new’ sqlite-src-3500200/tool/lemon.c:5553:16: return_function: returning to ‘Symbol_new’ from ‘Strsafe’ sqlite-src-3500200/tool/lemon.c:5553:5: release_memory: ‘x’ is NULL sqlite-src-3500200/tool/lemon.c:5554:16: danger: dereference of NULL ‘x’ # 5552| MemoryCheck(sp); # 5553| sp->name = Strsafe(x); # 5554|-> sp->type = ISUPPER(*x) ? TERMINAL : NONTERMINAL; # 5555| sp->rule = 0; # 5556| sp->fallback = 0; Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] sqlite-src-3500200/tool/lemon.c:6012:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ sqlite-src-3500200/tool/lemon.c:1424:16: enter_function: entry to ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1435:11: call_function: calling ‘newconfig’ from ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1435:11: return_function: returning to ‘Configlist_add’ from ‘newconfig’ sqlite-src-3500200/tool/lemon.c:1438:16: call_function: calling ‘SetNew’ from ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1438:16: return_function: returning to ‘Configlist_add’ from ‘SetNew’ sqlite-src-3500200/tool/lemon.c:1445:5: call_function: calling ‘Configtable_insert’ from ‘Configlist_add’ # 6010| h = confighash(oldnp->data) & (arrSize-1); # 6011| newnp = &(array.tbl[i]); # 6012|-> if( array.ht[h] ) array.ht[h]->from = &(newnp->next); # 6013| newnp->next = array.ht[h]; # 6014| newnp->data = oldnp->data; Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] sqlite-src-3500200/tool/lemon.c:6016:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ sqlite-src-3500200/tool/lemon.c:1424:16: enter_function: entry to ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1435:11: call_function: calling ‘newconfig’ from ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1435:11: return_function: returning to ‘Configlist_add’ from ‘newconfig’ sqlite-src-3500200/tool/lemon.c:1438:16: call_function: calling ‘SetNew’ from ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1438:16: return_function: returning to ‘Configlist_add’ from ‘SetNew’ sqlite-src-3500200/tool/lemon.c:1445:5: call_function: calling ‘Configtable_insert’ from ‘Configlist_add’ # 6014| newnp->data = oldnp->data; # 6015| newnp->from = &(array.ht[h]); # 6016|-> array.ht[h] = newnp; # 6017| } # 6018| *x4a = array; Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] sqlite-src-3500200/tool/lemon.c:6024:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ sqlite-src-3500200/tool/lemon.c:1424:16: enter_function: entry to ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1435:11: call_function: calling ‘newconfig’ from ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1435:11: return_function: returning to ‘Configlist_add’ from ‘newconfig’ sqlite-src-3500200/tool/lemon.c:1438:16: call_function: calling ‘SetNew’ from ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1438:16: return_function: returning to ‘Configlist_add’ from ‘SetNew’ sqlite-src-3500200/tool/lemon.c:1445:5: call_function: calling ‘Configtable_insert’ from ‘Configlist_add’ # 6022| np = &(x4a->tbl[x4a->count++]); # 6023| np->data = data; # 6024|-> if( x4a->ht[h] ) x4a->ht[h]->from = &(np->next); # 6025| np->next = x4a->ht[h]; # 6026| x4a->ht[h] = np; Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] sqlite-src-3500200/tool/lemon.c:6026:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ sqlite-src-3500200/tool/lemon.c:1424:16: enter_function: entry to ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1435:11: call_function: calling ‘newconfig’ from ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1435:11: return_function: returning to ‘Configlist_add’ from ‘newconfig’ sqlite-src-3500200/tool/lemon.c:1438:16: call_function: calling ‘SetNew’ from ‘Configlist_add’ sqlite-src-3500200/tool/lemon.c:1438:16: return_function: returning to ‘Configlist_add’ from ‘SetNew’ sqlite-src-3500200/tool/lemon.c:1445:5: call_function: calling ‘Configtable_insert’ from ‘Configlist_add’ # 6024| if( x4a->ht[h] ) x4a->ht[h]->from = &(np->next); # 6025| np->next = x4a->ht[h]; # 6026|-> x4a->ht[h] = np; # 6027| np->from = &(x4a->ht[h]); # 6028| return 1; Error: GCC_ANALYZER_WARNING (CWE-775): [#def41] sqlite-src-3500200/tool/sqldiff.c:62:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘out’ sqlite-src-3500200/tool/sqldiff.c:1899:5: enter_function: entry to ‘main’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_resource: opened here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:25: call_function: calling ‘cmdlineError’ from ‘main’ # 60| */ # 61| static void cmdlineError(const char *zFormat, ...){ # 62|-> sqlite3_str *pOut = sqlite3_str_new(0); # 63| va_list ap; # 64| va_start(ap, zFormat); Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] sqlite-src-3500200/tool/sqldiff.c:62:23: warning[-Wanalyzer-malloc-leak]: leak of ‘azExt’ sqlite-src-3500200/tool/sqldiff.c:1899:5: enter_function: entry to ‘main’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1931:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1931:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1935:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1935:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1940:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1941:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1942:49: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1943:11: branch_false: following ‘false’ branch (when ‘azExt’ is non-NULL)... sqlite-src-3500200/tool/sqldiff.c:1944:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1923:9: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1923:23: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1927:22: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1927:22: call_function: calling ‘cmdlineError’ from ‘main’ # 60| */ # 61| static void cmdlineError(const char *zFormat, ...){ # 62|-> sqlite3_str *pOut = sqlite3_str_new(0); # 63| va_list ap; # 64| va_start(ap, zFormat); Error: GCC_ANALYZER_WARNING (CWE-401): [#def43] sqlite-src-3500200/tool/sqldiff.c:62:23: warning[-Wanalyzer-malloc-leak]: leak of ‘out’ sqlite-src-3500200/tool/sqldiff.c:1899:5: enter_function: entry to ‘main’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_memory: allocated here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:25: call_function: calling ‘cmdlineError’ from ‘main’ # 60| */ # 61| static void cmdlineError(const char *zFormat, ...){ # 62|-> sqlite3_str *pOut = sqlite3_str_new(0); # 63| va_list ap; # 64| va_start(ap, zFormat); Error: GCC_ANALYZER_WARNING (CWE-775): [#def44] sqlite-src-3500200/tool/sqldiff.c:65:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘out’ sqlite-src-3500200/tool/sqldiff.c:1899:5: enter_function: entry to ‘main’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_resource: opened here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:25: call_function: calling ‘cmdlineError’ from ‘main’ # 63| va_list ap; # 64| va_start(ap, zFormat); # 65|-> sqlite3_str_vappendf(pOut, zFormat, ap); # 66| va_end(ap); # 67| sqlite3_fprintf(stderr, "%s: %s\n", g.zArgv0, sqlite3_str_value(pOut)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def45] sqlite-src-3500200/tool/sqldiff.c:65:3: warning[-Wanalyzer-malloc-leak]: leak of ‘azExt’ sqlite-src-3500200/tool/sqldiff.c:1899:5: enter_function: entry to ‘main’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1931:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1931:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1935:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1935:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1940:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1941:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1942:49: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1943:11: branch_false: following ‘false’ branch (when ‘azExt’ is non-NULL)... sqlite-src-3500200/tool/sqldiff.c:1944:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1923:9: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1923:23: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1927:22: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1927:22: call_function: calling ‘cmdlineError’ from ‘main’ # 63| va_list ap; # 64| va_start(ap, zFormat); # 65|-> sqlite3_str_vappendf(pOut, zFormat, ap); # 66| va_end(ap); # 67| sqlite3_fprintf(stderr, "%s: %s\n", g.zArgv0, sqlite3_str_value(pOut)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def46] sqlite-src-3500200/tool/sqldiff.c:65:3: warning[-Wanalyzer-malloc-leak]: leak of ‘out’ sqlite-src-3500200/tool/sqldiff.c:1899:5: enter_function: entry to ‘main’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_memory: allocated here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:25: call_function: calling ‘cmdlineError’ from ‘main’ # 63| va_list ap; # 64| va_start(ap, zFormat); # 65|-> sqlite3_str_vappendf(pOut, zFormat, ap); # 66| va_end(ap); # 67| sqlite3_fprintf(stderr, "%s: %s\n", g.zArgv0, sqlite3_str_value(pOut)); Error: GCC_ANALYZER_WARNING (CWE-404): [#def47] sqlite-src-3500200/tool/sqldiff.c:65:3: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ sqlite-src-3500200/tool/sqldiff.c:64:3: acquire_resource: ‘va_start’ called here sqlite-src-3500200/tool/sqldiff.c:65:3: throw: if ‘sqlite3_str_vappendf’ throws an exception... sqlite-src-3500200/tool/sqldiff.c:65:3: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 63| va_list ap; # 64| va_start(ap, zFormat); # 65|-> sqlite3_str_vappendf(pOut, zFormat, ap); # 66| va_end(ap); # 67| sqlite3_fprintf(stderr, "%s: %s\n", g.zArgv0, sqlite3_str_value(pOut)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def48] sqlite-src-3500200/tool/sqldiff.c:67:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘out’ sqlite-src-3500200/tool/sqldiff.c:1899:5: enter_function: entry to ‘main’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_resource: opened here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:25: call_function: calling ‘cmdlineError’ from ‘main’ # 65| sqlite3_str_vappendf(pOut, zFormat, ap); # 66| va_end(ap); # 67|-> sqlite3_fprintf(stderr, "%s: %s\n", g.zArgv0, sqlite3_str_value(pOut)); # 68| strFree(pOut); # 69| sqlite3_fprintf(stderr, "\"%s --help\" for more help\n", g.zArgv0); Error: GCC_ANALYZER_WARNING (CWE-401): [#def49] sqlite-src-3500200/tool/sqldiff.c:67:3: warning[-Wanalyzer-malloc-leak]: leak of ‘out’ sqlite-src-3500200/tool/sqldiff.c:1899:5: enter_function: entry to ‘main’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_memory: allocated here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:25: call_function: calling ‘cmdlineError’ from ‘main’ # 65| sqlite3_str_vappendf(pOut, zFormat, ap); # 66| va_end(ap); # 67|-> sqlite3_fprintf(stderr, "%s: %s\n", g.zArgv0, sqlite3_str_value(pOut)); # 68| strFree(pOut); # 69| sqlite3_fprintf(stderr, "\"%s --help\" for more help\n", g.zArgv0); Error: GCC_ANALYZER_WARNING (CWE-404): [#def50] sqlite-src-3500200/tool/sqldiff.c:81:3: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ sqlite-src-3500200/tool/sqldiff.c:80:3: acquire_resource: ‘va_start’ called here sqlite-src-3500200/tool/sqldiff.c:81:3: throw: if ‘sqlite3_str_vappendf’ throws an exception... sqlite-src-3500200/tool/sqldiff.c:81:3: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0) # 79| va_list ap; # 80| va_start(ap, zFormat); # 81|-> sqlite3_str_vappendf(pOut, zFormat, ap); # 82| va_end(ap); # 83| sqlite3_fprintf(stderr, "%s: %s\n", g.zArgv0, sqlite3_str_value(pOut)); Error: GCC_ANALYZER_WARNING (CWE-404): [#def51] sqlite-src-3500200/tool/sqldiff.c:124:10: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ sqlite-src-3500200/tool/sqldiff.c:134:22: enter_function: entry to ‘db_prepare’ sqlite-src-3500200/tool/sqldiff.c:137:3: acquire_resource: ‘va_start’ called here sqlite-src-3500200/tool/sqldiff.c:138:11: call_function: calling ‘db_vprepare’ from ‘db_prepare’ # 122| sqlite3_stmt *pStmt; # 123| # 124|-> zSql = sqlite3_vmprintf(zFormat, ap); # 125| if( zSql==0 ) runtimeError("out of memory"); # 126| rc = sqlite3_prepare_v2(g.db, zSql, -1, &pStmt, 0); Error: COMPILER_WARNING: [#def52] sqlite-src-3500200/tool/sqldiff.c: scope_hint: In function ‘all_tables_sql’ sqlite-src-3500200/tool/sqldiff.c:1823:9: warning[-Wunused-but-set-variable=]: variable ‘rc’ set but not used # 1823 | int rc; # | ^~ # 1821| const char *all_tables_sql(){ # 1822| if( g.bHandleVtab ){ # 1823|-> int rc; # 1824| # 1825| rc = sqlite3_exec(g.db, Error: GCC_ANALYZER_WARNING (CWE-775): [#def53] sqlite-src-3500200/tool/sqldiff.c:1963:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘out’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_resource: opened here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1931:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1935:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1935:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1940:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1940:9: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1947:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1950:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1950:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1953:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1953:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1956:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1956:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1959:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1959:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1960:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1960:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1961:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1963:11: throw: if ‘sqlite3_stricmp’ throws an exception... sqlite-src-3500200/tool/sqldiff.c:1963:11: danger: ‘out’ leaks here; was opened at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8) # 1961| zTab = argv[++i]; # 1962| g.bSchemaCompare = # 1963|-> sqlite3_stricmp(zTab, "sqlite_schema")==0 # 1964| || sqlite3_stricmp(zTab, "sqlite_master")==0; # 1965| }else Error: GCC_ANALYZER_WARNING (CWE-401): [#def54] sqlite-src-3500200/tool/sqldiff.c:1963:11: warning[-Wanalyzer-malloc-leak]: leak of ‘out’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_memory: allocated here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1931:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1935:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1935:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1940:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1940:9: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1947:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1950:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1950:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1953:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1953:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1956:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1956:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1959:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1959:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1960:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1960:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1961:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1963:11: throw: if ‘sqlite3_stricmp’ throws an exception... sqlite-src-3500200/tool/sqldiff.c:1963:11: danger: ‘out’ leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8) # 1961| zTab = argv[++i]; # 1962| g.bSchemaCompare = # 1963|-> sqlite3_stricmp(zTab, "sqlite_schema")==0 # 1964| || sqlite3_stricmp(zTab, "sqlite_master")==0; # 1965| }else Error: GCC_ANALYZER_WARNING (CWE-775): [#def55] sqlite-src-3500200/tool/sqldiff.c:1964:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘out’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_resource: opened here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1935:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1940:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1940:9: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1947:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1950:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1950:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1953:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1953:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1956:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1956:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1959:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1959:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1960:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1960:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1961:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1963:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1964:14: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1964:14: throw: if ‘sqlite3_stricmp’ throws an exception... sqlite-src-3500200/tool/sqldiff.c:1964:14: danger: ‘out’ leaks here; was opened at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8) # 1962| g.bSchemaCompare = # 1963| sqlite3_stricmp(zTab, "sqlite_schema")==0 # 1964|-> || sqlite3_stricmp(zTab, "sqlite_master")==0; # 1965| }else # 1966| if( strcmp(z,"transaction")==0 ){ Error: GCC_ANALYZER_WARNING (CWE-401): [#def56] sqlite-src-3500200/tool/sqldiff.c:1964:14: warning[-Wanalyzer-malloc-leak]: leak of ‘azExt’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1931:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1931:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1935:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1935:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1940:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1941:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1942:49: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1943:11: branch_false: following ‘false’ branch (when ‘azExt’ is non-NULL)... sqlite-src-3500200/tool/sqldiff.c:1944:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1923:9: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1923:23: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1931:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1931:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1935:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1935:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1940:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1940:9: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1947:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1950:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1950:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1953:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1953:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1956:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1956:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1959:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1959:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1960:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1960:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1961:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1963:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1964:14: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1964:14: throw: if ‘sqlite3_stricmp’ throws an exception... sqlite-src-3500200/tool/sqldiff.c:1964:14: danger: ‘azExt’ leaks here; was allocated at [(13)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/12) # 1962| g.bSchemaCompare = # 1963| sqlite3_stricmp(zTab, "sqlite_schema")==0 # 1964|-> || sqlite3_stricmp(zTab, "sqlite_master")==0; # 1965| }else # 1966| if( strcmp(z,"transaction")==0 ){ Error: GCC_ANALYZER_WARNING (CWE-401): [#def57] sqlite-src-3500200/tool/sqldiff.c:1964:14: warning[-Wanalyzer-malloc-leak]: leak of ‘out’ sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1924:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1925:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1925:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1926:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1926:15: acquire_memory: allocated here sqlite-src-3500200/tool/sqldiff.c:1927:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1919:20: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1919:12: branch_true: following ‘true’ branch (when ‘i < argc’)... sqlite-src-3500200/tool/sqldiff.c:1920:25: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1921:7: branch_true: following ‘true’ branch... sqlite-src-3500200/tool/sqldiff.c:1922:7: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1935:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1940:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1940:9: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1947:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1950:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1950:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1953:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1953:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1956:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1956:9: branch_false: following ‘false’ branch (when the strings are non-equal)... sqlite-src-3500200/tool/sqldiff.c:1959:11: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1959:9: branch_true: following ‘true’ branch (when the strings are equal)... sqlite-src-3500200/tool/sqldiff.c:1960:16: branch_true: ...to here sqlite-src-3500200/tool/sqldiff.c:1960:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1961:9: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1963:11: branch_false: following ‘false’ branch... sqlite-src-3500200/tool/sqldiff.c:1964:14: branch_false: ...to here sqlite-src-3500200/tool/sqldiff.c:1964:14: throw: if ‘sqlite3_stricmp’ throws an exception... sqlite-src-3500200/tool/sqldiff.c:1964:14: danger: ‘out’ leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8) # 1962| g.bSchemaCompare = # 1963| sqlite3_stricmp(zTab, "sqlite_schema")==0 # 1964|-> || sqlite3_stricmp(zTab, "sqlite_master")==0; # 1965| }else # 1966| if( strcmp(z,"transaction")==0 ){
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-79.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | sqlite-3.50.2-2.fc43 |
| store-results-to | /tmp/tmpvs3vzdur/sqlite-3.50.2-2.fc43.tar.xz |
| time-created | 2026-01-08 21:52:09 |
| time-finished | 2026-01-08 21:58:58 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpvs3vzdur/sqlite-3.50.2-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpvs3vzdur/sqlite-3.50.2-2.fc43.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |