sqc 0.4.84

Software Code Quality - CERT C compliance checker
{
  "ground_truth": [],
  "labels": [
    {"rule":"PRE02-C","file":"/home/brandon/toolchain/lua/llimits.h","line":18,"verdict":"FP","confidence":"high","reason":"l_numbits(t) is cast-only expression; no operator-precedence hazard in usage"},
    {"rule":"PRE02-C","file":"/home/brandon/toolchain/lua/llimits.h","line":37,"verdict":"FP","confidence":"high","reason":"MAX_LMEM macro body is safe; cast-heavy expression with no precedence ambiguity in practice"},
    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/llimits.h","line":65,"verdict":"FP","confidence":"high","reason":"ispow2(x) evaluates x twice but always called with pure side-effect-free expressions"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/llimits.h","line":65,"verdict":"FP","confidence":"high","reason":"ispow2 called only with pure expressions; multiple-evaluation is benign"},
    {"rule":"PRE02-C","file":"/home/brandon/toolchain/lua/llimits.h","line":90,"verdict":"FP","confidence":"high","reason":"point2uint macro is cast-expression; no precedence issue in typical use"},
    {"rule":"PRE01-C","file":"/home/brandon/toolchain/lua/llimits.h","line":106,"verdict":"FP","confidence":"high","reason":"LUAI_DDEC macro; 'dec' is used directly as a declaration suffix, not in expression context"},
    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/llimits.h","line":257,"verdict":"FP","confidence":"high","reason":"luai_nummod evaluates b twice but all call-sites use simple variables, not side-effecting expressions"},
    {"rule":"PRE01-C","file":"/home/brandon/toolchain/lua/llimits.h","line":257,"verdict":"FP","confidence":"high","reason":"L parameter used only as (void)L; statement-form use, no precedence issue"},
    {"rule":"PRE02-C","file":"/home/brandon/toolchain/lua/llimits.h","line":257,"verdict":"FP","confidence":"high","reason":"luai_nummod body is a compound statement block; wrapping in parens not applicable/meaningful"},
    {"rule":"PRE10-C","file":"/home/brandon/toolchain/lua/llimits.h","line":257,"verdict":"FP","confidence":"high","reason":"luai_nummod always used as a standalone statement (not in if/else without braces) in Lua codebase"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/llimits.h","line":257,"verdict":"FP","confidence":"high","reason":"b evaluated twice in luai_nummod; all call-sites use simple variables"},
    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/llimits.h","line":264,"verdict":"FP","confidence":"high","reason":"luai_numpow evaluates b twice but call-sites use pure expressions"},
    {"rule":"PRE01-C","file":"/home/brandon/toolchain/lua/llimits.h","line":264,"verdict":"FP","confidence":"high","reason":"b parameter in luai_numpow used in comparison; no precedence hazard at call sites"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/llimits.h","line":264,"verdict":"FP","confidence":"high","reason":"luai_numpow evaluates a and b twice; call-sites use simple variables"},
    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/llimits.h","line":279,"verdict":"FP","confidence":"high","reason":"luai_numisnan evaluates a twice; expands to !luai_numeq(a,a) — intentional identity-check idiom"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/llimits.h","line":279,"verdict":"FP","confidence":"high","reason":"NaN-check idiom requires evaluating a twice; not a defect"},
    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/llimits.h","line":293,"verdict":"FP","confidence":"high","reason":"lua_numbertointeger evaluates n twice; call-sites use simple float variables"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/llimits.h","line":293,"verdict":"FP","confidence":"high","reason":"lua_numbertointeger evaluates n twice; all call-sites use simple variables"},
    {"rule":"PRE01-C","file":"/home/brandon/toolchain/lua/llimits.h","line":322,"verdict":"FP","confidence":"high","reason":"LUAI_DDEC macro; dec is used as declaration, not as expression operand"},

    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":61,"verdict":"FP","confidence":"high","reason":"g is internal parameter; never NULL by contract; cross-TU internal API"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":76,"verdict":"FP","confidence":"high","reason":"L is not freed before line 76; sqc misidentifies ci-link manipulation as use-after-free"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":79,"verdict":"FP","confidence":"high","reason":"L is not freed; this is luaE_extendCI linking new CallInfo into L's list"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":79,"verdict":"FP","confidence":"high","reason":"Duplicate finding; same non-free of L"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":80,"verdict":"FP","confidence":"high","reason":"L is not freed; legitimate member access in luaE_extendCI"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":81,"verdict":"FP","confidence":"high","reason":"L is not freed; sqc false positive on CallInfo list linking"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":82,"verdict":"FP","confidence":"high","reason":"ci is not freed; ci->next access is on newly allocated ci"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":85,"verdict":"FP","confidence":"high","reason":"L is not freed; legitimate L->nci increment"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":86,"verdict":"FP","confidence":"high","reason":"ci is heap-allocated via luaM_reallocvector; not a stack local"},
    {"rule":"EXP34-C","file":"/home/brandon/toolchain/lua/lstate.c","line":115,"verdict":"FP","confidence":"high","reason":"next checked for NULL at line 82 before use; safe access pattern"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/lstate.c","line":136,"verdict":"FP","confidence":"high","reason":"Indirect recursion via error handler is intentional Lua design; not a defect"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":144,"verdict":"FP","confidence":"high","reason":"Internal function; L guaranteed non-NULL by Lua calling convention"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":182,"verdict":"FP","confidence":"high","reason":"L is not freed; freestack accesses L fields legitimately"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":184,"verdict":"FP","confidence":"high","reason":"L is not freed; sqc false positive on freestack internals"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":184,"verdict":"FP","confidence":"high","reason":"Duplicate finding; L not freed in freestack"},
    {"rule":"MEM31-C","file":"/home/brandon/toolchain/lua/lstate.c","line":194,"verdict":"FP","confidence":"high","reason":"registry is GC-managed; stored in g->l_registry; freed by GC at close_state"},
    {"rule":"EXP43-C","file":"/home/brandon/toolchain/lua/lstate.c","line":201,"verdict":"FP","confidence":"high","reason":"setthvalue is a macro writing to &aux; no restrict aliasing; sqc mis-parse"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":213,"verdict":"FP","confidence":"low","reason":"Advisory const-qualification; correct but not a defect"},
    {"rule":"EXP43-C","file":"/home/brandon/toolchain/lua/lstate.c","line":215,"verdict":"FP","confidence":"high","reason":"stack_init(L,L) passes L as both params; function uses them differently; no restrict involved"},
    {"rule":"DCL13-C","file":"/home/brandon/toolchain/lua/lstate.c","line":230,"verdict":"FP","confidence":"low","reason":"Advisory const-pointer parameter; not a defect"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":251,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":261,"verdict":"FP","confidence":"low","reason":"Advisory const-qualification"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":269,"verdict":"FP","confidence":"high","reason":"L is not freed before line 269; close_state accesses G(L)->strt legitimately"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":271,"verdict":"FP","confidence":"high","reason":"L not freed; freestack(L) call is legitimate"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":271,"verdict":"FP","confidence":"high","reason":"L not freed; duplicate finding in close_state"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":272,"verdict":"FP","confidence":"high","reason":"Not double-free; (*g->frealloc)(...) frees the global_State block, not L twice"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":278,"verdict":"FP","confidence":"high","reason":"Public LUA_API; NULL check would require error return; handled by lua_lock/unlock contract"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":279,"verdict":"FP","confidence":"low","reason":"Advisory const-qualification"},
    {"rule":"EXP30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":296,"verdict":"FP","confidence":"high","reason":"memcpy args are independent expressions; no sequencing issue"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":301,"verdict":"FP","confidence":"high","reason":"L1 is GC-heap-allocated (luaC_newobjdt); not a stack local"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":310,"verdict":"FP","confidence":"high","reason":"Not double-free; luaM_free(L,l) frees LX wrapper; L1 is a field of LX, not separately freed"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":315,"verdict":"FP","confidence":"high","reason":"Internal function; L guaranteed non-NULL"},
    {"rule":"EXP43-C","file":"/home/brandon/toolchain/lua/lstate.c","line":321,"verdict":"FP","confidence":"high","reason":"luaD_seterrorobj params are distinct stack slots; no overlap"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":324,"verdict":"FP","confidence":"high","reason":"L not freed in luaE_resetthread; legitimate stack pointer arithmetic"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":324,"verdict":"FP","confidence":"high","reason":"Duplicate; L not freed"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":324,"verdict":"FP","confidence":"high","reason":"Duplicate; L not freed"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":324,"verdict":"FP","confidence":"high","reason":"Duplicate; L not freed"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":324,"verdict":"FP","confidence":"high","reason":"Duplicate; L not freed"},
    {"rule":"MEM30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":324,"verdict":"FP","confidence":"high","reason":"Sixth duplicate MEM30-C finding on luaE_resetthread line 324; L not freed"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":329,"verdict":"FP","confidence":"high","reason":"Public LUA_API; internal contract guarantees L non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":329,"verdict":"FP","confidence":"high","reason":"'from' can legitimately be NULL (lua_closethread documents this)"},
    {"rule":"DCL15-C","file":"/home/brandon/toolchain/lua/lstate.c","line":329,"verdict":"FP","confidence":"high","reason":"lua_closethread is a public LUA_API symbol; must have external linkage"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":341,"verdict":"FP","confidence":"high","reason":"lua_newstate public API; ud is documented as user-supplied opaque pointer, may be NULL"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":344,"verdict":"FP","confidence":"low","reason":"Advisory const-qualification"},
    {"rule":"WIN04-C","file":"/home/brandon/toolchain/lua/lstate.c","line":344,"verdict":"FP","confidence":"high","reason":"WIN04-C is Windows-only; Lua targets POSIX and multiple platforms"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstate.c","line":392,"verdict":"FP","confidence":"high","reason":"L is &g->mainth.l — a field of heap-allocated global_State; not a stack local"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":396,"verdict":"FP","confidence":"high","reason":"Public LUA_API lua_close; NULL check not appropriate for public close function"},
    {"rule":"DCL15-C","file":"/home/brandon/toolchain/lua/lstate.c","line":396,"verdict":"FP","confidence":"high","reason":"lua_close is a public LUA_API; must have external linkage"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":403,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"DCL31-C","file":"/home/brandon/toolchain/lua/lstate.c","line":406,"verdict":"FP","confidence":"high","reason":"wf is a local variable (lua_WarnFunction wf = G(L)->warnf), not an undeclared function"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":413,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstate.c","line":413,"verdict":"FP","confidence":"high","reason":"where is internal parameter; always non-NULL in Lua error subsystem"},

    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":44,"verdict":"FP","confidence":"high","reason":"luaS_eqstr is internal; a and b are always non-NULL GC string objects"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":44,"verdict":"FP","confidence":"high","reason":"b always non-NULL GC string object"},
    {"rule":"EXP33-C","file":"/home/brandon/toolchain/lua/lstring.c","line":48,"verdict":"FP","confidence":"high","reason":"len1 and len2 initialized by getlstr macro (output-param address pass); not uninitialized use"},
    {"rule":"EXP33-C","file":"/home/brandon/toolchain/lua/lstring.c","line":48,"verdict":"FP","confidence":"high","reason":"len2 initialized by getlstr macro; not uninitialized use"},
    {"rule":"API05-C","file":"/home/brandon/toolchain/lua/lstring.c","line":53,"verdict":"FP","confidence":"high","reason":"Conformant-array-parameter is C99 advisory; Lua uses portable C89-compatible style"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":54,"verdict":"FP","confidence":"low","reason":"Advisory const-qualification; h is modified via ^="},
    {"rule":"INT14-C","file":"/home/brandon/toolchain/lua/lstring.c","line":54,"verdict":"FP","confidence":"high","reason":"Mixing bitwise and arithmetic on unsigned hash is standard hash function idiom"},
    {"rule":"INT14-C","file":"/home/brandon/toolchain/lua/lstring.c","line":56,"verdict":"FP","confidence":"high","reason":"Hash function intentionally mixes shifts and XOR with addition"},
    {"rule":"FIO50-C","file":"/home/brandon/toolchain/lua/lstring.c","line":56,"verdict":"FP","confidence":"high","reason":"h is an unsigned int hash variable, not a FILE stream; completely wrong rule application"},
    {"rule":"FIO50-C","file":"/home/brandon/toolchain/lua/lstring.c","line":56,"verdict":"FP","confidence":"high","reason":"Duplicate FIO50-C; h is an integer, not a file stream"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":61,"verdict":"FP","confidence":"high","reason":"Internal function; ts always non-NULL"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":81,"verdict":"FP","confidence":"low","reason":"Advisory; h is assigned from ts->hash and then returned"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":95,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":120,"verdict":"FP","confidence":"high","reason":"Internal function; g always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":133,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":134,"verdict":"FP","confidence":"low","reason":"Advisory; g is used for multiple field accesses"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":149,"verdict":"FP","confidence":"high","reason":"len is size_t; no overflow in switch/offsetof computation; internal function"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstring.c","line":175,"verdict":"FP","confidence":"high","reason":"ts is returned from createstrobj which returns a GC-heap pointer; not a stack local"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":179,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"EXP34-C","file":"/home/brandon/toolchain/lua/lstring.c","line":182,"verdict":"FP","confidence":"high","reason":"ts from createstrobj/luaC_newobj; luaC_newobj raises LUA_ERRMEM via longjmp, never returns NULL"},
    {"rule":"EXP08-C","file":"/home/brandon/toolchain/lua/lstring.c","line":184,"verdict":"FP","confidence":"high","reason":"cast_charp(ts) + offsetof(...) is standard Lua string layout idiom for flexible string storage"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstring.c","line":186,"verdict":"FP","confidence":"high","reason":"ts is heap-allocated GC object; not a stack local"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":190,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":190,"verdict":"FP","confidence":"high","reason":"Internal function; ts always non-NULL"},
    {"rule":"DCL13-C","file":"/home/brandon/toolchain/lua/lstring.c","line":190,"verdict":"FP","confidence":"low","reason":"Advisory const-pointer; ts->u.hnext is traversed to find/remove entry"},
    {"rule":"EXP40-C","file":"/home/brandon/toolchain/lua/lstring.c","line":192,"verdict":"FP","confidence":"high","reason":"No const objects involved; p is TString** traversing a mutable linked list"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/lstring.c","line":200,"verdict":"FP","confidence":"high","reason":"growstrtab indirect recursion through emergency GC is intentional Lua design; not a defect"},
    {"rule":"DCL13-C","file":"/home/brandon/toolchain/lua/lstring.c","line":200,"verdict":"FP","confidence":"low","reason":"Advisory const-pointer parameter"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/lstring.c","line":214,"verdict":"FP","confidence":"high","reason":"internshrstr indirect recursion via emergency GC is intentional Lua design"},
    {"rule":"API05-C","file":"/home/brandon/toolchain/lua/lstring.c","line":214,"verdict":"FP","confidence":"high","reason":"Conformant-array-parameter advisory not applicable to Lua's portable C style"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":216,"verdict":"FP","confidence":"low","reason":"Advisory; g used for multiple fields"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":218,"verdict":"FP","confidence":"low","reason":"Advisory; h is the hash result, used as key for bucket lookup"},
    {"rule":"STR34-C","file":"/home/brandon/toolchain/lua/lstring.c","line":218,"verdict":"FP","confidence":"high","reason":"str[l-1] is immediately cast via cast_byte() to lu_byte (unsigned); no sign extension"},
    {"rule":"EXP40-C","file":"/home/brandon/toolchain/lua/lstring.c","line":219,"verdict":"FP","confidence":"high","reason":"list points into mutable hash table; no const objects are modified through it"},
    {"rule":"ARR38-C","file":"/home/brandon/toolchain/lua/lstring.c","line":223,"verdict":"FP","confidence":"high","reason":"memcmp size is l*sizeof(char); both strings have length l (checked at line 222); safe"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstring.c","line":227,"verdict":"FP","confidence":"high","reason":"ts is GC-heap-allocated via createstrobj; not a stack local"},
    {"rule":"EXP34-C","file":"/home/brandon/toolchain/lua/lstring.c","line":236,"verdict":"FP","confidence":"high","reason":"ts from createstrobj/luaC_newobj; never returns NULL (longjmp on OOM)"},
    {"rule":"ARR38-C","file":"/home/brandon/toolchain/lua/lstring.c","line":238,"verdict":"FP","confidence":"high","reason":"memcpy copies l bytes into ts which was allocated with sizestrshr(l); exact fit"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstring.c","line":240,"verdict":"FP","confidence":"high","reason":"ts is heap-allocated; sqc incorrectly identifies it as stack local"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstring.c","line":242,"verdict":"FP","confidence":"high","reason":"ts is heap-allocated GC object; not a stack local"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/lstring.c","line":249,"verdict":"FP","confidence":"high","reason":"luaS_newlstr indirect recursion via emergency GC is intentional Lua design"},
    {"rule":"API05-C","file":"/home/brandon/toolchain/lua/lstring.c","line":249,"verdict":"FP","confidence":"high","reason":"Conformant-array-parameter advisory not applicable to Lua's portable C style"},
    {"rule":"ARR38-C","file":"/home/brandon/toolchain/lua/lstring.c","line":257,"verdict":"FP","confidence":"high","reason":"memcpy copies l bytes into getlngstr(ts) which was allocated with size l+1; safe"},
    {"rule":"EXP43-C","file":"/home/brandon/toolchain/lua/lstring.c","line":257,"verdict":"FP","confidence":"high","reason":"Source is external str param; dest is getlngstr(ts) inside newly allocated object; no overlap"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":269,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":269,"verdict":"FP","confidence":"high","reason":"str always non-NULL (caller passes C string literal or validated pointer)"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/lstring.c","line":269,"verdict":"FP","confidence":"high","reason":"luaS_new indirect recursion via emergency GC is intentional Lua design"},
    {"rule":"STR34-C","file":"/home/brandon/toolchain/lua/lstring.c","line":270,"verdict":"FP","confidence":"high","reason":"str[0] passed to point2uint which casts through cast_uint; sign extension harmless in hash"},
    {"rule":"INT10-C","file":"/home/brandon/toolchain/lua/lstring.c","line":270,"verdict":"FP","confidence":"high","reason":"Modulo is on unsigned int (point2uint result) % STRCACHE_N; no signed operands"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":286,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lstring.c","line":299,"verdict":"FP","confidence":"high","reason":"u is heap-allocated GC object via luaC_newobj; not a stack local"},
    {"rule":"DCL13-C","file":"/home/brandon/toolchain/lua/lstring.c","line":311,"verdict":"FP","confidence":"low","reason":"Advisory const-pointer parameter"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":318,"verdict":"FP","confidence":"high","reason":"s may be NULL only for LSTRMEM kind; handled by falloc path"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":318,"verdict":"FP","confidence":"high","reason":"len is caller-controlled size_t; no overflow in luaS_sizelngstr(0,kind)"},
    {"rule":"API05-C","file":"/home/brandon/toolchain/lua/lstring.c","line":319,"verdict":"FP","confidence":"high","reason":"Conformant-array-parameter advisory not applicable"},
    {"rule":"API05-C","file":"/home/brandon/toolchain/lua/lstring.c","line":319,"verdict":"FP","confidence":"high","reason":"Conformant-array-parameter advisory not applicable"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lstring.c","line":344,"verdict":"FP","confidence":"high","reason":"Internal function; ts always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/lstring.c","line":344,"verdict":"FP","confidence":"high","reason":"luaS_normstr indirect recursion via emergency GC is intentional Lua design"},

    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":34,"verdict":"FP","confidence":"high","reason":"aux_getn evaluates L twice; all call-sites pass a plain lua_State* variable"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":34,"verdict":"FP","confidence":"high","reason":"L evaluated twice in aux_getn; all call-sites use simple variable, not side-effecting expression"},
    {"rule":"EXP30-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":69,"verdict":"FP","confidence":"high","reason":"tcreate calls luaL_argcheck twice with independent args; no sequencing issue"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":76,"verdict":"FP","confidence":"low","reason":"Advisory const-qualification; e is modified at line 77"},
    {"rule":"EXP33-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":87,"verdict":"FP","confidence":"high","reason":"pos is assigned in every switch case (case 2 and case 3) before use at line 99"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":130,"verdict":"FP","confidence":"low","reason":"Advisory; e is used as loop bound and not modified after init"},
    {"rule":"EXP33-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":179,"verdict":"FP","confidence":"high","reason":"lsep is initialized by luaL_optlstring output parameter at line 173; not uninitialized"},
    {"rule":"STR30-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":202,"verdict":"FP","confidence":"high","reason":"lua_setfield takes const char* key; string literal is not modified"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":211,"verdict":"FP","confidence":"low","reason":"Advisory; e serves as loop bound in tunpack"},
    {"rule":"EXP30-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":214,"verdict":"FP","confidence":"high","reason":"tunpack: n is incremented in lua_checkstack arg; n is not read again in same expression"},
    {"rule":"EXP30-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":215,"verdict":"FP","confidence":"high","reason":"Duplicate finding; ++n in lua_checkstack call is well-defined single expression"},
    {"rule":"EXP20-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":215,"verdict":"FP","confidence":"high","reason":"lua_checkstack return is tested as boolean (0=failure); standard Lua API usage"},
    {"rule":"MSC37-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":297,"verdict":"FP","confidence":"high","reason":"partition() always returns via the 'return i' path or luaL_error (noreturn); no fall-through"},
    {"rule":"INT14-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":335,"verdict":"FP","confidence":"high","reason":"Mixing bitwise XOR and modulo in pivot randomization is intentional"},
    {"rule":"INT33-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":335,"verdict":"FP","confidence":"high","reason":"choosePivot only called when up-lo >= RANLIMIT(100), so r4=(up-lo)/4 >= 25; r4*2 never zero"},
    {"rule":"MEM05-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":344,"verdict":"FP","confidence":"high","reason":"auxsort is bounded recursion (O(log n) depth via smaller-half call); not unbounded"},
    {"rule":"ARR02-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":412,"verdict":"FP","confidence":"low","reason":"Sentinel-terminated initializer with implicit size is standard C idiom for function tables"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":425,"verdict":"FP","confidence":"high","reason":"Public LUAMOD_API; L is always non-NULL from the module loader"},
    {"rule":"DCL15-C","file":"/home/brandon/toolchain/lua/ltablib.c","line":425,"verdict":"FP","confidence":"high","reason":"luaopen_table is a public LUAMOD_API; must have external linkage for dynamic linking"},

    {"rule":"MEM31-C","file":"/home/brandon/toolchain/lua/ltm.c","line":1,"verdict":"FP","confidence":"high","reason":"tmname strings are GC-managed with luaC_fix; freed by GC at interpreter close"},
    {"rule":"DCL15-C","file":"/home/brandon/toolchain/lua/ltm.c","line":30,"verdict":"FP","confidence":"high","reason":"luaT_typenames_ is declared LUAI_DDEF; used externally via LUAI_DDEC in lobject.h"},
    {"rule":"DCL19-C","file":"/home/brandon/toolchain/lua/ltm.c","line":30,"verdict":"FP","confidence":"low","reason":"Advisory scope reduction; luaT_typenames_ is intentionally file-scope for cross-TU access"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":38,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"ARR02-C","file":"/home/brandon/toolchain/lua/ltm.c","line":39,"verdict":"FP","confidence":"low","reason":"Sentinel-terminated local array with implicit bounds is standard C idiom"},
    {"rule":"MEM31-C","file":"/home/brandon/toolchain/lua/ltm.c","line":50,"verdict":"FP","confidence":"high","reason":"tmname[i] is GC-managed string; luaC_fix prevents collection; freed at interpreter shutdown"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":60,"verdict":"FP","confidence":"high","reason":"Internal function; events and ename always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":60,"verdict":"FP","confidence":"high","reason":"Internal function; ename always non-NULL"},
    {"rule":"INT34-C","file":"/home/brandon/toolchain/lua/ltm.c","line":64,"verdict":"FP","confidence":"high","reason":"event is TMS enum value; lua_assert(event <= TM_EQ) at line 62 ensures it is within 0..TM_EQ (<32)"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/ltm.c","line":67,"verdict":"FP","confidence":"high","reason":"tm is pointer returned by luaH_Hgetshortstr pointing into table storage; not a stack local"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":71,"verdict":"FP","confidence":"high","reason":"Internal function; L and o always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":71,"verdict":"FP","confidence":"high","reason":"Internal function; o always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":91,"verdict":"FP","confidence":"high","reason":"Internal function; o always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":91,"verdict":"FP","confidence":"high","reason":"luaT_objtypename indirect recursion via GC emergency is intentional Lua design"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":103,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":103,"verdict":"FP","confidence":"high","reason":"Internal function; f always non-NULL (caller checked)"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":103,"verdict":"FP","confidence":"high","reason":"Internal function; p1 always non-NULL stack pointer"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":103,"verdict":"FP","confidence":"high","reason":"Internal function; p2 always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":103,"verdict":"FP","confidence":"high","reason":"Internal function; p3 always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":103,"verdict":"FP","confidence":"high","reason":"luaT_callTM indirect recursion via VM dispatch is intentional Lua metamethod design"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":119,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":119,"verdict":"FP","confidence":"high","reason":"Internal function; f always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":119,"verdict":"FP","confidence":"high","reason":"Internal function; p1 always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":119,"verdict":"FP","confidence":"high","reason":"Internal function; p2 always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":119,"verdict":"FP","confidence":"high","reason":"luaT_callTMres indirect recursion via VM dispatch is intentional Lua design"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":138,"verdict":"FP","confidence":"high","reason":"callbinTM indirect recursion is intentional metamethod dispatch chain"},
    {"rule":"MSC37-C","file":"/home/brandon/toolchain/lua/ltm.c","line":138,"verdict":"FP","confidence":"high","reason":"callbinTM returns -1 or result of luaT_callTMres; all paths have explicit returns"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":150,"verdict":"FP","confidence":"high","reason":"luaT_trybinTM indirect recursion is intentional Lua dispatch design"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":173,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":173,"verdict":"FP","confidence":"high","reason":"luaT_tryconcatTM indirect recursion is intentional Lua design"},
    {"rule":"EXP30-C","file":"/home/brandon/toolchain/lua/ltm.c","line":175,"verdict":"FP","confidence":"high","reason":"callbinTM and s2v(p1+1) args are evaluated in separate expressions; no sequencing issue"},
    {"rule":"ARR37-C","file":"/home/brandon/toolchain/lua/ltm.c","line":175,"verdict":"FP","confidence":"high","reason":"p1 is StkId (stack slot pointer); p1+1 points to next contiguous stack slot; valid pointer arithmetic"},
    {"rule":"EXP30-C","file":"/home/brandon/toolchain/lua/ltm.c","line":176,"verdict":"FP","confidence":"high","reason":"luaG_concaterror args s2v(p1) and s2v(p1+1) are independent sub-expressions; no issue"},
    {"rule":"ARR37-C","file":"/home/brandon/toolchain/lua/ltm.c","line":176,"verdict":"FP","confidence":"high","reason":"p1 is StkId into contiguous stack array; p1+1 is valid stack pointer arithmetic"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":180,"verdict":"FP","confidence":"high","reason":"luaT_trybinassocTM indirect recursion is intentional Lua dispatch design"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":189,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":189,"verdict":"FP","confidence":"high","reason":"Internal function; p1 always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":189,"verdict":"FP","confidence":"high","reason":"luaT_trybiniTM indirect recursion is intentional Lua dispatch design"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":200,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":200,"verdict":"FP","confidence":"high","reason":"Internal function; p1 always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":200,"verdict":"FP","confidence":"high","reason":"Internal function; p2 always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":210,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":210,"verdict":"FP","confidence":"high","reason":"Internal function; p1 always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":231,"verdict":"FP","confidence":"high","reason":"createvarargtab indirect recursion is intentional Lua design"},
    {"rule":"MEM31-C","file":"/home/brandon/toolchain/lua/ltm.c","line":234,"verdict":"FP","confidence":"high","reason":"t is GC-managed table anchored on stack (sethvalue into L->top); freed by GC"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":272,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":272,"verdict":"FP","confidence":"high","reason":"Internal function; ci always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":272,"verdict":"FP","confidence":"high","reason":"Internal function; p (Proto*) always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":272,"verdict":"FP","confidence":"high","reason":"luaT_adjustvarargs indirect recursion is intentional Lua design"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":292,"verdict":"FP","confidence":"high","reason":"Internal function; ci always non-NULL"},
    {"rule":"DCL13-C","file":"/home/brandon/toolchain/lua/ltm.c","line":292,"verdict":"FP","confidence":"low","reason":"Advisory const-pointer parameter"},
    {"rule":"EXP33-C","file":"/home/brandon/toolchain/lua/ltm.c","line":305,"verdict":"FP","confidence":"high","reason":"len is initialized by getlstr macro (output-param address pass); not uninitialized use"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":321,"verdict":"FP","confidence":"high","reason":"getnumargs indirect recursion is intentional Lua design"},
    {"rule":"DCL13-C","file":"/home/brandon/toolchain/lua/ltm.c","line":321,"verdict":"FP","confidence":"low","reason":"Advisory const-pointer parameter"},
    {"rule":"MEM10-C","file":"/home/brandon/toolchain/lua/ltm.c","line":322,"verdict":"FP","confidence":"high","reason":"Direct NULL check is appropriate; MEM10-C advisory wrapper pattern not required"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":338,"verdict":"FP","confidence":"high","reason":"Internal function; L always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":338,"verdict":"FP","confidence":"high","reason":"Internal function; ci always non-NULL"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/ltm.c","line":338,"verdict":"FP","confidence":"high","reason":"luaT_getvarargs indirect recursion is intentional Lua design"},
    {"rule":"DCL00-C","file":"/home/brandon/toolchain/lua/ltm.c","line":340,"verdict":"FP","confidence":"low","reason":"Advisory; h is used in conditional and loop"},

    {"rule":"MSC37-C","file":"/home/brandon/toolchain/lua/lundump.c","line":45,"verdict":"FP","confidence":"high","reason":"error() is declared l_noret (noreturn attribute); always terminates via luaD_throw"},
    {"rule":"DCL13-C","file":"/home/brandon/toolchain/lua/lundump.c","line":45,"verdict":"FP","confidence":"low","reason":"Advisory const-pointer parameter"},
    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/lundump.c","line":55,"verdict":"FP","confidence":"high","reason":"loadVector macro: b and n used once each in expansion; no multiple-evaluation issue"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/lundump.c","line":55,"verdict":"FP","confidence":"high","reason":"b appears in sizeof((b)[0]) and as argument; sizeof does not evaluate; single evaluation"},
    {"rule":"API05-C","file":"/home/brandon/toolchain/lua/lundump.c","line":57,"verdict":"FP","confidence":"high","reason":"Conformant-array-parameter advisory not applicable to Lua's portable C style"},
    {"rule":"INT33-C","file":"/home/brandon/toolchain/lua/lundump.c","line":65,"verdict":"FP","confidence":"high","reason":"align is unsigned; loadAlign called with sizeof(type) which is always >= 1; never zero"},
    {"rule":"INT33-C","file":"/home/brandon/toolchain/lua/lundump.c","line":69,"verdict":"FP","confidence":"high","reason":"align is sizeof(type) >= 1; never zero at this point in loadAlign"},
    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/lundump.c","line":74,"verdict":"FP","confidence":"high","reason":"getaddr macro: n and t each appear once in expansion; no multiple-evaluation"},
    {"rule":"PRE01-C","file":"/home/brandon/toolchain/lua/lundump.c","line":74,"verdict":"FP","confidence":"high","reason":"t in getaddr macro used in cast(t*, ...) and sizeof(t); cast context; no precedence issue"},
    {"rule":"PRE02-C","file":"/home/brandon/toolchain/lua/lundump.c","line":74,"verdict":"FP","confidence":"high","reason":"getaddr macro result is a cast expression; wrapping in parens has no effect on usage"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/lundump.c","line":74,"verdict":"FP","confidence":"high","reason":"t used in cast and sizeof; sizeof does not evaluate; single effective evaluation"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lundump.c","line":81,"verdict":"FP","confidence":"high","reason":"block is pointer into ZIO buffer (via luaZ_getaddr); not a stack local"},
    {"rule":"INT13-C","file":"/home/brandon/toolchain/lua/lundump.c","line":105,"verdict":"FP","confidence":"high","reason":"b is int but value is 0-127 (0x7f mask applied); OR with lua_Unsigned x is safe"},
    {"rule":"INT13-C","file":"/home/brandon/toolchain/lua/lundump.c","line":106,"verdict":"FP","confidence":"high","reason":"b & 0x80: b is non-negative byte value 0-255; AND with positive constant is safe"},
    {"rule":"EXP33-C","file":"/home/brandon/toolchain/lua/lundump.c","line":124,"verdict":"FP","confidence":"high","reason":"x in loadNumber is initialized by loadVar macro (output parameter); not uninitialized"},
    {"rule":"ENV01-C","file":"/home/brandon/toolchain/lua/lundump.c","line":164,"verdict":"FP","confidence":"high","reason":"buff is compile-time fixed size LUAI_MAXSHORTLEN+1; no getenv() involved"},
    {"rule":"MEM05-C","file":"/home/brandon/toolchain/lua/lundump.c","line":164,"verdict":"FP","confidence":"high","reason":"buff is fixed-size stack array LUAI_MAXSHORTLEN+1 (compile-time constant); not a VLA"},
    {"rule":"ARR30-C","file":"/home/brandon/toolchain/lua/lundump.c","line":165,"verdict":"FP","confidence":"high","reason":"loadVector reads size+1 bytes into buff[LUAI_MAXSHORTLEN+1]; size <= LUAI_MAXSHORTLEN so size+1 <= buffer size"},
    {"rule":"ARR01-C","file":"/home/brandon/toolchain/lua/lundump.c","line":189,"verdict":"FP","confidence":"high","reason":"sizeof(f->code[0]) is sizeof on an element through pointer, yielding sizeof(Instruction); correct"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/lundump.c","line":247,"verdict":"FP","confidence":"high","reason":"loadProtos/loadFunction mutual recursion is intentional for nested Lua function prototypes"},
    {"rule":"MSC04-C","file":"/home/brandon/toolchain/lua/lundump.c","line":326,"verdict":"FP","confidence":"high","reason":"loadFunction/loadProtos mutual recursion is intentional; bounded by proto nesting depth"},
    {"rule":"MEM05-C","file":"/home/brandon/toolchain/lua/lundump.c","line":345,"verdict":"FP","confidence":"high","reason":"buff size is sizeof(LUA_SIGNATURE)+sizeof(LUAC_DATA) — compile-time constant; not VLA"},
    {"rule":"STR34-C","file":"/home/brandon/toolchain/lua/lundump.c","line":346,"verdict":"FP","confidence":"high","reason":"strlen(s) where s is const char*; no signed char sign extension in strlen argument"},
    {"rule":"ARR30-C","file":"/home/brandon/toolchain/lua/lundump.c","line":347,"verdict":"FP","confidence":"high","reason":"loadVector reads len bytes into buff[sizeof(LUA_SIGNATURE)+sizeof(LUAC_DATA)]; len=strlen(s) fits"},
    {"rule":"MSC37-C","file":"/home/brandon/toolchain/lua/lundump.c","line":353,"verdict":"FP","confidence":"high","reason":"numerror calls error() which is l_noret (noreturn); always terminates"},
    {"rule":"PRE00-C","file":"/home/brandon/toolchain/lua/lundump.c","line":371,"verdict":"FP","confidence":"high","reason":"checknum macro: tvar and S appear once in expansion context; no multiple-evaluation"},
    {"rule":"PRE01-C","file":"/home/brandon/toolchain/lua/lundump.c","line":371,"verdict":"FP","confidence":"high","reason":"tvar used as type declaration in block; not in expression operator context"},
    {"rule":"PRE10-C","file":"/home/brandon/toolchain/lua/lundump.c","line":371,"verdict":"FP","confidence":"high","reason":"checknum always used as standalone statement in checkHeader; not in dangling-else context"},
    {"rule":"PRE12-C","file":"/home/brandon/toolchain/lua/lundump.c","line":371,"verdict":"FP","confidence":"high","reason":"S used in checknumsize and loadVar; two different macro calls; intentional dual use"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lundump.c","line":395,"verdict":"FP","confidence":"high","reason":"Public function; L and Z always non-NULL per callers (luaL_loadbuffer etc.)"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lundump.c","line":395,"verdict":"FP","confidence":"high","reason":"Z always non-NULL"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lundump.c","line":395,"verdict":"FP","confidence":"high","reason":"anchor is the caller-provided hash table; always non-NULL per calling convention"},
    {"rule":"API00-C","file":"/home/brandon/toolchain/lua/lundump.c","line":395,"verdict":"FP","confidence":"high","reason":"name is always non-NULL (load functions pass chunk name string)"},
    {"rule":"DCL13-C","file":"/home/brandon/toolchain/lua/lundump.c","line":395,"verdict":"FP","confidence":"low","reason":"Advisory const-pointer; Z is ZIO stream that gets read from (mutable)"},
    {"rule":"EXP34-C","file":"/home/brandon/toolchain/lua/lundump.c","line":413,"verdict":"FP","confidence":"high","reason":"cl from luaF_newLclosure raises LUA_ERRMEM on OOM; never returns NULL"},
    {"rule":"DCL30-C","file":"/home/brandon/toolchain/lua/lundump.c","line":419,"verdict":"FP","confidence":"high","reason":"cl is GC-heap-allocated via luaF_newLclosure; not a stack local"}
  ],
  "fns": [],
  "files_reviewed": [
    "/home/brandon/toolchain/lua/llimits.h",
    "/home/brandon/toolchain/lua/lstate.c",
    "/home/brandon/toolchain/lua/lstring.c",
    "/home/brandon/toolchain/lua/ltablib.c",
    "/home/brandon/toolchain/lua/ltm.c",
    "/home/brandon/toolchain/lua/lundump.c"
  ],
  "files_clean": [
    "/home/brandon/toolchain/lua/llimits.h",
    "/home/brandon/toolchain/lua/lstate.c",
    "/home/brandon/toolchain/lua/lstring.c",
    "/home/brandon/toolchain/lua/ltablib.c",
    "/home/brandon/toolchain/lua/ltm.c",
    "/home/brandon/toolchain/lua/lundump.c"
  ],
  "summary": {
    "ground_truth": 0,
    "tp": 0,
    "fp": 243,
    "fn": 0
  }
}