jq-1.7.1-7.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
jq-1.7.1-build/jq-jq-1.7.1/src/builtin.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
jq-1.7.1-build/jq-jq-1.7.1/src/bytecode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def3]
jq-1.7.1-build/jq-jq-1.7.1/src/compile.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def4]
jq-1.7.1-build/jq-jq-1.7.1/src/compile.c:594:29: warning[core.NullDereference]: Access to field 'op' results in a dereference of a null pointer (loaded from field 'first')
#  592|       return gen_op_simple(DUP);
#  593|     }
#  594|->   if (block_is_single(a) && a.first->op == LOADK) {
#  595|       jv c = block_const(a);
#  596|       block_free(a);

Error: CPPCHECK_WARNING: [#def5]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decContext.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def7]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:3874:7: warning[deadcode.DeadStores]: Value stored to 'bits' is never read
# 3872|         Int adjust;                       // work

# 3873|         Int lexp=lhs->exponent;           // save in case LHS==RES

# 3874|->       bits=lhs->bits;                   // ..

# 3875|         residue=0;                        // clear accumulator

# 3876|         decCopyFit(res, rhs, set, &residue, status); // copy (as needed)


Error: CLANG_WARNING: [#def8]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:3910:7: warning[deadcode.DeadStores]: Value stored to 'bits' is never read
# 3908|         Int adjust;                       // work

# 3909|         Int rexp=rhs->exponent;           // save in case RHS==RES

# 3910|->       bits=rhs->bits;                   // be clean

# 3911|         residue=0;                        // clear accumulator

# 3912|         decCopyFit(res, lhs, set, &residue, status); // copy (as needed)


Error: CLANG_WARNING: [#def9]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:4587:16: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
# 4585|         // if the residue is zero, the operation is done (unless divide

# 4586|         // or divideInteger and still not enough digits yet)

# 4587|->       if (*var1==0 && var1units==1) {        // residue is 0

# 4588|           if (op&(REMAINDER|REMNEAR)) break;

# 4589|           if ((op&DIVIDE) && (exponent<=maxexponent)) break;


Error: CLANG_WARNING: [#def10]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:4642:13: warning[deadcode.DeadStores]: Value stored to 'accunits' is never read
# 4640|               accunits=decShiftToLeast(accnext, accunits, drop);

# 4641|               accdigits=decGetDigits(accnext, accunits);

# 4642|->             accunits=D2U(accdigits);

# 4643|               // [exponent was adjusted in the loop]

# 4644|               }


Error: CLANG_WARNING: [#def11]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:4768:13: warning[deadcode.DeadStores]: Value stored to 'accunits' is never read
# 4766|                                       expunits, accnext, -(Int)powers[exprem]);

# 4767|               accdigits=decGetDigits(accnext, accunits); // count digits exactly

# 4768|->             accunits=D2U(accdigits);    // and recalculate the units for copy

# 4769|               // [exponent is as for original remainder]

# 4770|               bits^=DECNEG;               // flip the sign


Error: CLANG_WARNING: [#def12]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:5027:14: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
# 5025|           lp=zacc+(rip-zrhi);                  // where to add the lhs

# 5026|           for (lip=zlhi; lip<=lmsi; lip++, lp++) { // over each item in lhs

# 5027|->           *lp+=(uLong)(*lip)*(*rip);         // [this should in-line]

# 5028|             } // lip loop

# 5029|           lazy--;


Error: CLANG_WARNING: [#def13]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:5043:20: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
# 5041|              else { // two-place carry [fairly rare]

# 5042|               uInt carry2=(uInt)(lcarry/FASTBASE);    // top top part

# 5043|->             *(lp+2)+=carry2;                        // add to item+2

# 5044|               *lp-=((uLong)FASTBASE*FASTBASE*carry2); // [slow]

# 5045|               carry=(uInt)(lcarry-((uLong)FASTBASE*carry2)); // [inline]


Error: CLANG_WARNING: [#def14]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:5047:18: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
# 5045|               carry=(uInt)(lcarry-((uLong)FASTBASE*carry2)); // [inline]

# 5046|               }

# 5047|->           *(lp+1)+=carry;                    // add to item above [inline]

# 5048|             *lp-=((uLong)FASTBASE*carry);      // [inline]

# 5049|             } // carry resolution


Error: GCC_ANALYZER_WARNING (CWE-457): [#def15]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c: scope_hint: In function 'decUnitCompare'
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:6282:37: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*u'
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:170: included_from: Included from here.
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:6210:36: note: in expansion of macro 'D2U'
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:6209:36: note: in expansion of macro 'D2U'
# 6280|      else {                               // non-negative result

# 6281|       // check units of the result before freeing any storage

# 6282|->     for (u=acc; u<acc+accunits-1 && *u==0;) u++;

# 6283|       result=(*u==0 ? 0 : +1);

# 6284|       }


Error: GCC_ANALYZER_WARNING (CWE-126): [#def16]
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c: scope_hint: In function 'decUnitAddSub'
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:6382:19: warning[-Wanalyzer-out-of-bounds]: buffer over-read
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c: scope_hint: In function 'decUnitAddSub'
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:7219:26: note: in expansion of macro 'D2U'
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:6382:19: note: read of 2 bytes from after the end of 'uarrone'
jq-1.7.1-build/jq-jq-1.7.1/src/decNumber/decNumber.c:6382:19: note: valid subscripts for 'uarrone' are '[0]' to '[0]'
#                                      └──────────────────────────────────┘
#                                                       ^
# 6380|       carry+=*a;

# 6381|       a++;

# 6382|->     carry+=((eInt)*b)*m;                // [special-casing m=1/-1

# 6383|       b++;                                // here is not a win]

# 6384|       // here carry is new Unit of digits; it could be +ve or -ve


Error: CPPCHECK_WARNING: [#def17]
jq-1.7.1-build/jq-jq-1.7.1/src/execute.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def18]
jq-1.7.1-build/jq-jq-1.7.1/src/jq_test.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def19]
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def20]
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c: scope_hint: In function 'jv_object_iter_key'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:1853:6: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:35: included_from: Included from here.
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:86:24: note: in expansion of macro 'JVP_FLAGS'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:89:34: note: in expansion of macro 'JVP_KIND'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:1723:10: note: in expansion of macro 'JVP_HAS_KIND'
jq-1.7.1-build/jq-jq-1.7.1/src/jv_alloc.h:5: included_from: Included from here.
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:44: included_from: Included from here.
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:1726:3: note: in expansion of macro 'jv_object_foreach'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:1726:3: note: in expansion of macro 'jv_object_foreach'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c: scope_hint: In function 'jv_object_iter_key'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c: scope_hint: In function 'jv_object_iter_key'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:1726:3: note: in expansion of macro 'jv_object_foreach'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:1726:3: note: in expansion of macro 'jv_object_foreach'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:1726:3: note: in expansion of macro 'jv_object_foreach'
jq-1.7.1-build/jq-jq-1.7.1/src/jv.c:1726:3: note: in expansion of macro 'jv_object_foreach'
# 1851|   
# 1852|   jv jv_object_iter_key(jv object, int iter) {
# 1853|->   jv s = jvp_object_get_slot(object, iter)->string;
# 1854|     assert(JVP_HAS_KIND(s, JV_KIND_STRING));
# 1855|     return jv_copy(s);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_alloc.c: scope_hint: In function 'tsd_init_nomem_handler'
jq-1.7.1-build/jq-jq-1.7.1/src/jv_alloc.c:89:1: warning[-Wanalyzer-malloc-leak]: leak of 'nomem_handler'
#   87|       }
#   88|     }
#   89|-> }
#   90|   
#   91|   void jv_nomem_handler(jv_nomem_handler_f handler, void *data) {

Error: CPPCHECK_WARNING: [#def22]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_aux.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def23]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_aux.c:113:11: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  111|       jv e = parse_slice(jv_copy(t), k, &start, &end);
#  112|       if (jv_get_kind(e) == JV_KIND_TRUE) {
#  113|->       v = jv_array_slice(t, start, end);
#  114|       } else {
#  115|         jv_free(t);

Error: CLANG_WARNING: [#def24]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_aux.c:122:11: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  120|       jv e = parse_slice(jv_copy(t), k, &start, &end);
#  121|       if (jv_get_kind(e) == JV_KIND_TRUE) {
#  122|->       v = jv_string_slice(t, start, end);
#  123|       } else {
#  124|         jv_free(t);

Error: CLANG_WARNING: [#def25]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_aux.c:190:18: warning[core.UndefinedBinaryOperatorResult]: The right operand of '<=' is a garbage value
#  188|         if (jv_get_kind(v) == JV_KIND_ARRAY) {
#  189|           int array_len = jv_array_length(jv_copy(t));
#  190|->         assert(0 <= start && start <= end && end <= array_len);
#  191|           int slice_len = end - start;
#  192|           int insert_len = jv_array_length(jv_copy(v));

Error: CLANG_WARNING: [#def26]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_aux.c:297:44: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  295|           jv e = parse_slice(jv_copy(t), key, &start, &end);
#  296|           if (jv_get_kind(e) == JV_KIND_TRUE) {
#  297|->           starts = jv_array_append(starts, jv_number(start));
#  298|             ends = jv_array_append(ends, jv_number(end));
#  299|           } else {

Error: CPPCHECK_WARNING: [#def27]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_dtoa.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def28]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_dtoa.c:3646:51: warning[core.BitwiseShift]: Right shift by '32' overflows the capacity of 'ULong'
# 3644|   
# 3645|   		i = bbits + be + (Bias + (P-1) - 1);
# 3646|-> 		x = i > 32  ? word0(&u) << (64 - i) | word1(&u) >> (i - 32)
# 3647|   			    : word1(&u) << (32 - i);
# 3648|   		dval(&d2) = x;

Error: CPPCHECK_WARNING: [#def29]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def30]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_parse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def31]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_print.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def32]
jq-1.7.1-build/jq-jq-1.7.1/src/jv_unicode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def33]
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c: scope_hint: In function 'jq_yy_init_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:2003:19: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:1882:10: note: in expansion of macro 'yyrestart'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:1889:27: note: in expansion of macro 'yy_create_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:1947:21: note: in expansion of macro 'yy_create_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:1889:27: note: in expansion of macro 'yy_create_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:1892:2: note: in expansion of macro 'yy_init_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:1892:2: note: in expansion of macro 'yy_init_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:1892:2: note: in expansion of macro 'yy_init_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:1995:17: note: in expansion of macro 'yy_init_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:2001:2: note: in expansion of macro 'yy_flush_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:2024:10: note: in expansion of macro 'yy_flush_buffer'
jq-1.7.1-build/jq-jq-1.7.1/src/lexer.c:2001:2: note: in expansion of macro 'yy_flush_buffer'
# 2001|   
# 2002|   	yy_flush_buffer( b , yyscanner);
# 2003|-> 
# 2004|   	b->yy_input_file = file;
# 2005|   	b->yy_fill_buffer = 1;

Error: CPPCHECK_WARNING: [#def35]
jq-1.7.1-build/jq-jq-1.7.1/src/linker.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def36]
jq-1.7.1-build/jq-jq-1.7.1/src/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def37]
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def38]
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c: scope_hint: In function 'yyparse'
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c:863:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'yyss'
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c:848:9: note: in expansion of macro 'YYCOPY'
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c:2531:9: note: in expansion of macro 'YYSTACK_RELOCATE'
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c:863:25: note: in definition of macro 'YYCOPY'
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c:2531:9: note: in expansion of macro 'YYSTACK_RELOCATE'
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c:848:9: note: in expansion of macro 'YYCOPY'
jq-1.7.1-build/jq-jq-1.7.1/src/parser.c:2531:9: note: in expansion of macro 'YYSTACK_RELOCATE'
#  861|   #  if defined __GNUC__ && 1 < __GNUC__
#  862|   #   define YYCOPY(Dst, Src, Count) \
#  863|->       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
#  864|   #  else
#  865|   #   define YYCOPY(Dst, Src, Count)              \

Error: CPPCHECK_WARNING: [#def39]
jq-1.7.1-build/jq-jq-1.7.1/src/util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-83.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namejq-1.7.1-7.fc41
store-results-to/tmp/tmpmu_bgis8/jq-1.7.1-7.fc41.tar.xz
time-created2024-07-03 13:36:05
time-finished2024-07-03 13:37:38
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpmu_bgis8/jq-1.7.1-7.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpmu_bgis8/jq-1.7.1-7.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9