lua-5.4.8-4.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-404): [#def1]
lua-5.4.8/src/lapi.c:571:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:570:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:571:9: throw: if 'luaO_pushvfstring' throws an exception...
lua-5.4.8/src/lapi.c:571:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  569|     lua_lock(L);
#  570|     va_start(argp, fmt);
#  571|->   ret = luaO_pushvfstring(L, fmt, argp);
#  572|     va_end(argp);
#  573|     luaC_checkGC(L);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def2]
lua-5.4.8/src/lapi.c:1147:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:1137:6: branch_false: following 'false' branch...
lua-5.4.8/src/lapi.c:1140:3: branch_false: ...to here
lua-5.4.8/src/lapi.c:1140:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:1147:7: throw: if 'luaE_setdebt' throws an exception...
lua-5.4.8/src/lapi.c:1147:7: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1145|       }
# 1146|       case LUA_GCRESTART: {
# 1147|->       luaE_setdebt(g, 0);
# 1148|         g->gcstp = 0;  /* (GCSTPGC must be already zero here) */
# 1149|         break;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def3]
lua-5.4.8/src/lapi.c:1152:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:1137:6: branch_false: following 'false' branch...
lua-5.4.8/src/lapi.c:1140:3: branch_false: ...to here
lua-5.4.8/src/lapi.c:1140:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:1152:7: throw: if 'luaC_fullgc' throws an exception...
lua-5.4.8/src/lapi.c:1152:7: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 1150|       }
# 1151|       case LUA_GCCOLLECT: {
# 1152|->       luaC_fullgc(L, 0);
# 1153|         break;
# 1154|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def4]
lua-5.4.8/src/lapi.c:1170:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:1137:6: branch_false: following 'false' branch...
lua-5.4.8/src/lapi.c:1140:3: branch_false: ...to here
lua-5.4.8/src/lapi.c:1140:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:1169:10: branch_true: following 'true' branch (when 'data == 0')...
lua-5.4.8/src/lapi.c:1170:9: branch_true: ...to here
lua-5.4.8/src/lapi.c:1170:9: throw: if 'luaE_setdebt' throws an exception...
lua-5.4.8/src/lapi.c:1170:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1168|         g->gcstp = 0;  /* allow GC to run (GCSTPGC must be zero here) */
# 1169|         if (data == 0) {
# 1170|->         luaE_setdebt(g, 0);  /* do a basic step */
# 1171|           luaC_step(L);
# 1172|         }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def5]
lua-5.4.8/src/lapi.c:1171:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:1137:6: branch_false: following 'false' branch...
lua-5.4.8/src/lapi.c:1140:3: branch_false: ...to here
lua-5.4.8/src/lapi.c:1140:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:1169:10: branch_true: following 'true' branch (when 'data == 0')...
lua-5.4.8/src/lapi.c:1170:9: branch_true: ...to here
lua-5.4.8/src/lapi.c:1171:9: throw: if 'luaC_step' throws an exception...
lua-5.4.8/src/lapi.c:1171:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1169|         if (data == 0) {
# 1170|           luaE_setdebt(g, 0);  /* do a basic step */
# 1171|->         luaC_step(L);
# 1172|         }
# 1173|         else {  /* add 'data' to total debt */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def6]
lua-5.4.8/src/lapi.c:1175:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:1137:6: branch_false: following 'false' branch...
lua-5.4.8/src/lapi.c:1140:3: branch_false: ...to here
lua-5.4.8/src/lapi.c:1140:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:1169:10: branch_false: following 'false' branch (when 'data != 0')...
lua-5.4.8/src/lapi.c:1174:16: branch_false: ...to here
lua-5.4.8/src/lapi.c:1175:9: throw: if 'luaE_setdebt' throws an exception...
lua-5.4.8/src/lapi.c:1175:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 1173|         else {  /* add 'data' to total debt */
# 1174|           debt = cast(l_mem, data) * 1024 + g->GCdebt;
# 1175|->         luaE_setdebt(g, debt);
# 1176|           luaC_checkGC(L);
# 1177|         }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def7]
lua-5.4.8/src/lapi.c:1176:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:1137:6: branch_false: following 'false' branch...
lua-5.4.8/src/lapi.c:1140:3: branch_false: ...to here
lua-5.4.8/src/lapi.c:1140:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:1169:10: branch_false: following 'false' branch (when 'data != 0')...
lua-5.4.8/src/lapi.c:1174:16: branch_false: ...to here
lua-5.4.8/src/lapi.c:1176:9: branch_true: following 'true' branch...
lua-5.4.8/src/lapi.c:1176:9: branch_true: ...to here
lua-5.4.8/src/lapi.c:1176:9: throw: if 'luaC_step' throws an exception...
lua-5.4.8/src/lapi.c:1176:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 1174|           debt = cast(l_mem, data) * 1024 + g->GCdebt;
# 1175|           luaE_setdebt(g, debt);
# 1176|->         luaC_checkGC(L);
# 1177|         }
# 1178|         g->gcstp = oldstp;  /* restore previous state */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def8]
lua-5.4.8/src/lapi.c:1207:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:1137:6: branch_false: following 'false' branch...
lua-5.4.8/src/lapi.c:1140:3: branch_false: ...to here
lua-5.4.8/src/lapi.c:1140:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:1207:7: throw: if 'luaC_changemode' throws an exception...
lua-5.4.8/src/lapi.c:1207:7: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 1205|         if (majormul != 0)
# 1206|           setgcparam(g->genmajormul, majormul);
# 1207|->       luaC_changemode(L, KGC_GEN);
# 1208|         break;
# 1209|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def9]
lua-5.4.8/src/lapi.c:1221:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lapi.c:1137:6: branch_false: following 'false' branch...
lua-5.4.8/src/lapi.c:1140:3: branch_false: ...to here
lua-5.4.8/src/lapi.c:1140:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lapi.c:1221:7: throw: if 'luaC_changemode' throws an exception...
lua-5.4.8/src/lapi.c:1221:7: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 1219|         if (stepsize != 0)
# 1220|           g->gcstepsize = stepsize;
# 1221|->       luaC_changemode(L, KGC_INC);
# 1222|         break;
# 1223|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def10]
lua-5.4.8/src/lauxlib.c:219:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lauxlib.c:383:17: enter_function: entry to 'luaL_checkstack'
lua-5.4.8/src/lauxlib.c:388:7: call_function: calling 'luaL_error' from 'luaL_checkstack'
#  217|   LUALIB_API void luaL_where (lua_State *L, int level) {
#  218|     lua_Debug ar;
#  219|->   if (lua_getstack(L, level, &ar)) {  /* check function at level */
#  220|       lua_getinfo(L, "Sl", &ar);  /* get info about it */
#  221|       if (ar.currentline > 0) {  /* is there info? */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def11]
lua-5.4.8/src/lauxlib.c:220:5: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lauxlib.c:383:17: enter_function: entry to 'luaL_checkstack'
lua-5.4.8/src/lauxlib.c:388:7: call_function: calling 'luaL_error' from 'luaL_checkstack'
#  218|     lua_Debug ar;
#  219|     if (lua_getstack(L, level, &ar)) {  /* check function at level */
#  220|->     lua_getinfo(L, "Sl", &ar);  /* get info about it */
#  221|       if (ar.currentline > 0) {  /* is there info? */
#  222|         lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def12]
lua-5.4.8/src/lauxlib.c:222:7: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lauxlib.c:383:17: enter_function: entry to 'luaL_checkstack'
lua-5.4.8/src/lauxlib.c:388:7: call_function: calling 'luaL_error' from 'luaL_checkstack'
#  220|       lua_getinfo(L, "Sl", &ar);  /* get info about it */
#  221|       if (ar.currentline > 0) {  /* is there info? */
#  222|->       lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);
#  223|         return;
#  224|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def13]
lua-5.4.8/src/lauxlib.c:226:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lauxlib.c:383:17: enter_function: entry to 'luaL_checkstack'
lua-5.4.8/src/lauxlib.c:388:7: call_function: calling 'luaL_error' from 'luaL_checkstack'
#  224|       }
#  225|     }
#  226|->   lua_pushfstring(L, "");  /* else, no information available... */
#  227|   }
#  228|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def14]
lua-5.4.8/src/lauxlib.c:239:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lauxlib.c:383:17: enter_function: entry to 'luaL_checkstack'
lua-5.4.8/src/lauxlib.c:388:7: call_function: calling 'luaL_error' from 'luaL_checkstack'
#  237|     va_start(argp, fmt);
#  238|     luaL_where(L, 1);
#  239|->   lua_pushvfstring(L, fmt, argp);
#  240|     va_end(argp);
#  241|     lua_concat(L, 2);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
lua-5.4.8/src/lauxlib.c:807:14: warning[-Wanalyzer-file-leak]: leak of FILE 'lf.f'
lua-5.4.8/src/lauxlib.c:790:6: branch_false: following 'false' branch (when 'filename' is non-NULL)...
lua-5.4.8/src/lauxlib.c:795:5: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:797:12: acquire_resource: opened here
lua-5.4.8/src/lauxlib.c:798:8: branch_false: following 'false' branch...
lua-5.4.8/src/lauxlib.c:800:3: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:803:6: branch_true: following 'true' branch...
lua-5.4.8/src/lauxlib.c:804:5: branch_true: ...to here
lua-5.4.8/src/lauxlib.c:805:8: branch_true: following 'true' branch (when 'filename' is non-NULL)...
lua-5.4.8/src/lauxlib.c:806:7: branch_true: ...to here
lua-5.4.8/src/lauxlib.c:807:14: throw: if 'freopen' throws an exception...
lua-5.4.8/src/lauxlib.c:807:14: danger: 'lf.f' leaks here; was opened at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  805|       if (filename) {  /* "real" file? */
#  806|         errno = 0;
#  807|->       lf.f = freopen(filename, "rb", lf.f);  /* reopen in binary mode */
#  808|         if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
#  809|         skipcomment(lf.f, &c);  /* re-read initial portion */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
lua-5.4.8/src/lauxlib.c:807:14: warning[-Wanalyzer-malloc-leak]: leak of 'lf.f'
lua-5.4.8/src/lauxlib.c:790:6: branch_false: following 'false' branch (when 'filename' is non-NULL)...
lua-5.4.8/src/lauxlib.c:795:5: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:797:12: acquire_memory: allocated here
lua-5.4.8/src/lauxlib.c:798:8: branch_false: following 'false' branch...
lua-5.4.8/src/lauxlib.c:800:3: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:803:6: branch_true: following 'true' branch...
lua-5.4.8/src/lauxlib.c:804:5: branch_true: ...to here
lua-5.4.8/src/lauxlib.c:805:8: branch_true: following 'true' branch (when 'filename' is non-NULL)...
lua-5.4.8/src/lauxlib.c:806:7: branch_true: ...to here
lua-5.4.8/src/lauxlib.c:807:14: throw: if 'freopen' throws an exception...
lua-5.4.8/src/lauxlib.c:807:14: danger: 'lf.f' leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  805|       if (filename) {  /* "real" file? */
#  806|         errno = 0;
#  807|->       lf.f = freopen(filename, "rb", lf.f);  /* reopen in binary mode */
#  808|         if (lf.f == NULL) return errfile(L, "reopen", fnameindex);
#  809|         skipcomment(lf.f, &c);  /* re-read initial portion */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
lua-5.4.8/src/lauxlib.c:815:12: warning[-Wanalyzer-file-leak]: leak of FILE 'lf.f'
lua-5.4.8/src/lauxlib.c:790:6: branch_false: following 'false' branch (when 'filename' is non-NULL)...
lua-5.4.8/src/lauxlib.c:795:5: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:797:12: acquire_resource: opened here
lua-5.4.8/src/lauxlib.c:798:8: branch_false: following 'false' branch...
lua-5.4.8/src/lauxlib.c:800:3: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:803:6: branch_false: following 'false' branch...
lua-5.4.8/src/lauxlib.c:812:7: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:812:6: branch_false: following 'false' branch...
lua-5.4.8/src/lauxlib.c:814:3: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:815:12: throw: if 'lua_tolstring' throws an exception...
lua-5.4.8/src/lauxlib.c:815:12: danger: 'lf.f' leaks here; was opened at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  813|       lf.buff[lf.n++] = c;  /* 'c' is the first character of the stream */
#  814|     errno = 0;
#  815|->   status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode);
#  816|     readstatus = ferror(lf.f);
#  817|     if (filename) fclose(lf.f);  /* close file (even in case of errors) */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
lua-5.4.8/src/lauxlib.c:815:12: warning[-Wanalyzer-malloc-leak]: leak of 'lf.f'
lua-5.4.8/src/lauxlib.c:790:6: branch_false: following 'false' branch (when 'filename' is non-NULL)...
lua-5.4.8/src/lauxlib.c:795:5: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:797:12: acquire_memory: allocated here
lua-5.4.8/src/lauxlib.c:798:8: branch_false: following 'false' branch...
lua-5.4.8/src/lauxlib.c:800:3: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:803:6: branch_false: following 'false' branch...
lua-5.4.8/src/lauxlib.c:812:7: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:812:6: branch_false: following 'false' branch...
lua-5.4.8/src/lauxlib.c:814:3: branch_false: ...to here
lua-5.4.8/src/lauxlib.c:815:12: throw: if 'lua_tolstring' throws an exception...
lua-5.4.8/src/lauxlib.c:815:12: danger: 'lf.f' leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  813|       lf.buff[lf.n++] = c;  /* 'c' is the first character of the stream */
#  814|     errno = 0;
#  815|->   status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode);
#  816|     readstatus = ferror(lf.f);
#  817|     if (filename) fclose(lf.f);  /* close file (even in case of errors) */

Error: GCC_ANALYZER_WARNING (CWE-457): [#def19]
lua-5.4.8/src/lcode.c:566:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*v.value_'
lua-5.4.8/src/lcode.c:1000:12: enter_function: entry to 'luaK_exp2K'
lua-5.4.8/src/lcode.c:1004:26: call_function: inlined call to 'boolT' from 'luaK_exp2K'
#  564|     luaM_growvector(L, f->k, k, f->sizek, TValue, MAXARG_Ax, "constants");
#  565|     while (oldsize < f->sizek) setnilvalue(&f->k[oldsize++]);
#  566|->   setobj(L, &f->k[k], v);
#  567|     fs->nk++;
#  568|     luaC_barrier(L, f, v);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def20]
lua-5.4.8/src/ldebug.c:854:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/ldebug.c:853:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/ldebug.c:854:9: throw: if 'luaO_pushvfstring' throws an exception...
lua-5.4.8/src/ldebug.c:854:9: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  852|     luaC_checkGC(L);  /* error message uses memory */
#  853|     va_start(argp, fmt);
#  854|->   msg = luaO_pushvfstring(L, fmt, argp);  /* format message */
#  855|     va_end(argp);
#  856|     if (isLua(ci)) {  /* if Lua function, add source:line information */

Error: CPPCHECK_WARNING (CWE-758): [#def21]
lua-5.4.8/src/ldump.c:55: warning[objectIndex]: The address of variable 'x' might be accessed at non-zero index.
#   53|   static void dumpByte (DumpState *D, int y) {
#   54|     lu_byte x = (lu_byte)y;
#   55|->   dumpVar(D, x);
#   56|   }
#   57|   

Error: CPPCHECK_WARNING (CWE-758): [#def22]
lua-5.4.8/src/ldump.c:83: warning[objectIndex]: The address of variable 'x' might be accessed at non-zero index.
#   81|   
#   82|   static void dumpNumber (DumpState *D, lua_Number x) {
#   83|->   dumpVar(D, x);
#   84|   }
#   85|   

Error: CPPCHECK_WARNING (CWE-758): [#def23]
lua-5.4.8/src/ldump.c:88: warning[objectIndex]: The address of variable 'x' might be accessed at non-zero index.
#   86|   
#   87|   static void dumpInteger (DumpState *D, lua_Integer x) {
#   88|->   dumpVar(D, x);
#   89|   }
#   90|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
lua-5.4.8/src/lgc.c:150:3: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
lua-5.4.8/src/lgc.c:1734:6: enter_function: entry to 'luaC_fullgc'
lua-5.4.8/src/lgc.c:1738:6: branch_true: following 'true' branch...
lua-5.4.8/src/lgc.c:1739:5: branch_true: ...to here
lua-5.4.8/src/lgc.c:1739:5: call_function: calling 'fullinc' from 'luaC_fullgc'
#  148|   static void linkgclist_ (GCObject *o, GCObject **pnext, GCObject **list) {
#  149|     lua_assert(!isgray(o));  /* cannot be in a gray list */
#  150|->   *pnext = *list;
#  151|     *list = o;
#  152|     set2gray(o);  /* now it is */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
lua-5.4.8/src/lgc.c:667:13: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
lua-5.4.8/src/lgc.c:1734:6: enter_function: entry to 'luaC_fullgc'
lua-5.4.8/src/lgc.c:1738:6: branch_true: following 'true' branch...
lua-5.4.8/src/lgc.c:1739:5: branch_true: ...to here
lua-5.4.8/src/lgc.c:1739:5: call_function: calling 'fullinc' from 'luaC_fullgc'
#  665|     GCObject *o = g->gray;
#  666|     nw2black(o);
#  667|->   g->gray = *getgclist(o);  /* remove from 'gray' list */
#  668|     switch (o->tt) {
#  669|       case LUA_VTABLE: return traversetable(g, gco2t(o));

Error: GCC_ANALYZER_WARNING (CWE-404): [#def26]
lua-5.4.8/src/lobject.c:416:3: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
lua-5.4.8/src/lobject.c:549:13: enter_function: entry to 'luaO_pushfstring'
lua-5.4.8/src/lobject.c:552:3: acquire_resource: 'va_start' called here
lua-5.4.8/src/lobject.c:553:9: call_function: calling 'luaO_pushvfstring' from 'luaO_pushfstring'
#  414|   static void pushstr (BuffFS *buff, const char *str, size_t lstr) {
#  415|     lua_State *L = buff->L;
#  416|->   setsvalue2s(L, L->top.p, luaS_newlstr(L, str, lstr));
#  417|     L->top.p++;  /* may use one slot from EXTRA_STACK */
#  418|     if (!buff->pushed)  /* no previous string on the stack? */

Error: CPPCHECK_WARNING (CWE-758): [#def27]
lua-5.4.8/src/lundump.c:95: warning[objectIndex]: The address of variable 'x' might be accessed at non-zero index.
#   93|   static lua_Number loadNumber (LoadState *S) {
#   94|     lua_Number x;
#   95|->   loadVar(S, x);
#   96|     return x;
#   97|   }

Error: CPPCHECK_WARNING (CWE-758): [#def28]
lua-5.4.8/src/lundump.c:102: warning[objectIndex]: The address of variable 'x' might be accessed at non-zero index.
#  100|   static lua_Integer loadInteger (LoadState *S) {
#  101|     lua_Integer x;
#  102|->   loadVar(S, x);
#  103|     return x;
#  104|   }

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-12.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelua-5.4.8-4.fc44
store-results-to/tmp/tmpgq2r1gmo/lua-5.4.8-4.fc44.tar.xz
time-created2026-01-08 19:30:14
time-finished2026-01-08 19:31:51
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpgq2r1gmo/lua-5.4.8-4.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpgq2r1gmo/lua-5.4.8-4.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9