Fixed findings

List of Findings

Error: CPPCHECK_WARNING (CWE-476): [#def1]
perl-5.42.1/class.c:884: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#  882|           aux = (UNOP_AUX_item *)PerlMemShared_malloc(sizeof(UNOP_AUX_item) * 2);
#  883|   
#  884|->         aux[0].uv = fieldix;
#  885|   
#  886|           OP *fieldop = newUNOP_AUX(OP_INITFIELD, valop ? OPf_STACKED : 0, valop, aux);

Error: CPPCHECK_WARNING (CWE-682): [#def2]
perl-5.42.1/class.c:989: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  987|           UNOP_AUX_item *ap = aux;
#  988|   
#  989|->         (ap++)->uv = av_count(fieldmap) / 2;
#  990|           (ap++)->uv = max_fieldix;
#  991|   

Error: CPPCHECK_WARNING (CWE-476): [#def3]
perl-5.42.1/class.c:989: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ap++
#  987|           UNOP_AUX_item *ap = aux;
#  988|   
#  989|->         (ap++)->uv = av_count(fieldmap) / 2;
#  990|           (ap++)->uv = max_fieldix;
#  991|   

Error: CPPCHECK_WARNING (CWE-682): [#def4]
perl-5.42.1/class.c:1095: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1093|   
# 1094|           UNOP_AUX_item *ap = aux;
# 1095|->         (ap++)->uv = 1;       /* fieldcount */
# 1096|           (ap++)->uv = fieldix; /* max_fieldix */
# 1097|   

Error: CPPCHECK_WARNING (CWE-476): [#def5]
perl-5.42.1/class.c:1095: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ap++
# 1093|   
# 1094|           UNOP_AUX_item *ap = aux;
# 1095|->         (ap++)->uv = 1;       /* fieldcount */
# 1096|           (ap++)->uv = fieldix; /* max_fieldix */
# 1097|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
perl-5.42.1/class.c:1095:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.42.1/class.c:1070:7: branch_true: following ‘true’ branch...
perl-5.42.1/class.c:1073:25: branch_true: ...to here
perl-5.42.1/class.c:1091:32: acquire_memory: this call could return NULL
perl-5.42.1/class.c:1095:9: danger: ‘aux’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 1093|   
# 1094|           UNOP_AUX_item *ap = aux;
# 1095|->         (ap++)->uv = 1;       /* fieldcount */
# 1096|           (ap++)->uv = fieldix; /* max_fieldix */
# 1097|   

Error: CPPCHECK_WARNING (CWE-476): [#def7]
perl-5.42.1/class.c:1109: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1107|               PerlMemShared_malloc(sizeof(*aux));
# 1108|   
# 1109|->         aux->params     = 0;
# 1110|           aux->opt_params = 0;
# 1111|           aux->slurpy     = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
perl-5.42.1/class.c:1109:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.42.1/class.c:1070:7: branch_true: following ‘true’ branch...
perl-5.42.1/class.c:1073:25: branch_true: ...to here
perl-5.42.1/class.c:1107:13: acquire_memory: this call could return NULL
perl-5.42.1/class.c:1109:9: danger: ‘aux’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1107|               PerlMemShared_malloc(sizeof(*aux));
# 1108|   
# 1109|->         aux->params     = 0;
# 1110|           aux->opt_params = 0;
# 1111|           aux->slurpy     = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def9]
perl-5.42.1/class.c:1110: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1108|   
# 1109|           aux->params     = 0;
# 1110|->         aux->opt_params = 0;
# 1111|           aux->slurpy     = 0;
# 1112|   

Error: CPPCHECK_WARNING (CWE-476): [#def10]
perl-5.42.1/class.c:1111: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1109|           aux->params     = 0;
# 1110|           aux->opt_params = 0;
# 1111|->         aux->slurpy     = 0;
# 1112|   
# 1113|           argcheckop = newUNOP_AUX(OP_ARGCHECK, 0, NULL, (UNOP_AUX_item *)aux);

Error: CPPCHECK_WARNING (CWE-682): [#def11]
perl-5.42.1/class.c:1200: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1198|   
# 1199|           UNOP_AUX_item *ap = aux;
# 1200|->         (ap++)->uv = 1;       /* fieldcount */
# 1201|           (ap++)->uv = fieldix; /* max_fieldix */
# 1202|   

Error: CPPCHECK_WARNING (CWE-476): [#def12]
perl-5.42.1/class.c:1200: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ap++
# 1198|   
# 1199|           UNOP_AUX_item *ap = aux;
# 1200|->         (ap++)->uv = 1;       /* fieldcount */
# 1201|           (ap++)->uv = fieldix; /* max_fieldix */
# 1202|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
perl-5.42.1/class.c:1200:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.42.1/class.c:1163:7: branch_false: following ‘false’ branch (when ‘sigil == 36’)...
perl-5.42.1/class.c:1166:7: branch_false: ...to here
perl-5.42.1/class.c:1175:7: branch_true: following ‘true’ branch...
perl-5.42.1/class.c:1178:25: branch_true: ...to here
perl-5.42.1/class.c:1196:32: acquire_memory: this call could return NULL
perl-5.42.1/class.c:1200:9: danger: ‘aux’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
# 1198|   
# 1199|           UNOP_AUX_item *ap = aux;
# 1200|->         (ap++)->uv = 1;       /* fieldcount */
# 1201|           (ap++)->uv = fieldix; /* max_fieldix */
# 1202|   

Error: CPPCHECK_WARNING (CWE-476): [#def14]
perl-5.42.1/class.c:1214: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1212|               PerlMemShared_malloc(sizeof(*aux));
# 1213|   
# 1214|->         aux->params     = 1;
# 1215|           aux->opt_params = 0;
# 1216|           aux->slurpy     = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
perl-5.42.1/class.c:1214:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.42.1/class.c:1163:7: branch_false: following ‘false’ branch (when ‘sigil == 36’)...
perl-5.42.1/class.c:1166:7: branch_false: ...to here
perl-5.42.1/class.c:1175:7: branch_true: following ‘true’ branch...
perl-5.42.1/class.c:1178:25: branch_true: ...to here
perl-5.42.1/class.c:1212:13: acquire_memory: this call could return NULL
perl-5.42.1/class.c:1214:9: danger: ‘aux’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
# 1212|               PerlMemShared_malloc(sizeof(*aux));
# 1213|   
# 1214|->         aux->params     = 1;
# 1215|           aux->opt_params = 0;
# 1216|           aux->slurpy     = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def16]
perl-5.42.1/class.c:1215: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1213|   
# 1214|           aux->params     = 1;
# 1215|->         aux->opt_params = 0;
# 1216|           aux->slurpy     = 0;
# 1217|   

Error: CPPCHECK_WARNING (CWE-476): [#def17]
perl-5.42.1/class.c:1216: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1214|           aux->params     = 1;
# 1215|           aux->opt_params = 0;
# 1216|->         aux->slurpy     = 0;
# 1217|   
# 1218|           argcheckop = newUNOP_AUX(OP_ARGCHECK, 0, NULL, (UNOP_AUX_item *)aux);

Error: CPPCHECK_WARNING (CWE-457): [#def18]
perl-5.42.1/cpan/Digest-MD5/MD5.xs:508: warning[uninitvar]: Uninitialized variable: to
#  506|       }
#  507|       *d = '\0';
#  508|->     return to;
#  509|   }
#  510|   

Error: CPPCHECK_WARNING (CWE-457): [#def19]
perl-5.42.1/cpan/Digest-SHA/src/sha.c:127: error[uninitvar]: Uninitialized variable: *wp
#  125|   	M15(Ch, K1,  *wp++); M11(Ch, K1,  *wp++); M12(Ch, K1,  *wp++);
#  126|   	M13(Ch, K1,  *wp++); M14(Ch, K1,  *wp++); M15(Ch, K1,  *wp++);
#  127|-> 	M11(Ch, K1,  *wp  ); M12(Ch, K1, A1( 0)); M13(Ch, K1, A1( 1));
#  128|   	M14(Ch, K1, A1( 2)); M15(Ch, K1, A1( 3)); M11(Pa, K2, A1( 4));
#  129|   	M12(Pa, K2, A1( 5)); M13(Pa, K2, A1( 6)); M14(Pa, K2, A1( 7));

Error: CPPCHECK_WARNING (CWE-457): [#def20]
perl-5.42.1/cpan/Digest-SHA/src/sha.c:197: error[uninitvar]: Uninitialized variable: *wp
#  195|   	M25( *wp++); M26( *wp++); M27( *wp++); M28( *wp++);
#  196|   	M21( *wp++); M22( *wp++); M23( *wp++); M24( *wp++);
#  197|-> 	M25( *wp++); M26( *wp++); M27( *wp++); M28( *wp  );
#  198|   	M21(A2( 0)); M22(A2( 1)); M23(A2( 2)); M24(A2( 3));
#  199|   	M25(A2( 4)); M26(A2( 5)); M27(A2( 6)); M28(A2( 7));

Error: CPPCHECK_WARNING (CWE-562): [#def21]
perl-5.42.1/dist/Time-HiRes/HiRes.xs:1528: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1526|           fakeop.op_flags = GIMME_V == G_LIST ? OPf_WANT_LIST :
# 1527|               GIMME_V == G_SCALAR ? OPf_WANT_SCALAR : OPf_WANT_VOID;
# 1528|->         PL_op = &fakeop;
# 1529|           (void)fakeop.op_ppaddr(aTHX);
# 1530|           SPAGAIN;

Error: COMPILER_WARNING (CWE-563): [#def22]
perl-5.42.1/dist/Time-HiRes/tmp23106.c: scope_hint: In function ‘main’
perl-5.42.1/dist/Time-HiRes/tmp23106.c:7:13: warning[-Wunused-variable]: unused variable ‘tictoc’
#    7 |     clock_t tictoc;
#      |             ^~~~~~

Error: COMPILER_WARNING (CWE-457): [#def23]
perl-5.42.1/dist/Time-HiRes/tmp23106.c:9:12: warning[-Wmaybe-uninitialized]: ‘ts1’ may be used uninitialized
#    9 |     ret1 = futimens(0, ts1);
#      |            ^~~~~~~~~~~~~~~~
perl-5.42.1/perl.h:1771: included_from: Included from here.
/usr/include/sys/stat.h:452:12: note: by argument 2 of type ‘const struct timespec[2]’ to ‘futimens’ declared here
#  452 | extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
#      |            ^~~~~~~~
perl-5.42.1/dist/Time-HiRes/tmp23106.c:8:21: note: ‘ts1’ declared here
#    8 |     struct timespec ts1[2], ts2[2];
#      |                     ^~~

Error: COMPILER_WARNING (CWE-252): [#def24]
perl-5.42.1/dist/Time-HiRes/tmp23106.c: scope_hint: In function ‘main’
perl-5.42.1/dist/Time-HiRes/tmp23106.c:11:5: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   11 |     read(0, buf, 0); /* Assuming reading nothing updates atime (the [0]) */
#      |     ^~~~~~~~~~~~~~~

Error: COMPILER_WARNING (CWE-457): [#def25]
perl-5.42.1/dist/Time-HiRes/tmp23106.c:12:12: warning[-Wmaybe-uninitialized]: ‘ts1’ may be used uninitialized
#   12 |     ret1 = utimensat(AT_FDCWD, "/dev/stdin", ts1, 0);
#      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
perl-5.42.1/perl.h:1771: included_from: Included from here.
/usr/include/sys/stat.h:433:12: note: by argument 3 of type ‘const struct timespec[2]’ to ‘utimensat’ declared here
#  433 | extern int utimensat (int __fd, const char *__path,
#      |            ^~~~~~~~~
perl-5.42.1/dist/Time-HiRes/tmp23106.c:9:21: note: ‘ts1’ declared here
#    9 |     struct timespec ts1[2], ts2[2];
#      |                     ^~~

Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
perl-5.42.1/dist/Time-HiRes/tmp23106.c:13:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ts1[0].tv_nsec’
perl-5.42.1/dist/Time-HiRes/tmp23106.c:13:5: branch_true: following ‘true’ branch...
perl-5.42.1/dist/Time-HiRes/tmp23106.c:13:32: branch_true: ...to here
perl-5.42.1/dist/Time-HiRes/tmp23106.c:13:32: danger: use of uninitialized value ‘ts1[0].tv_nsec’ here

Error: COMPILER_WARNING (CWE-252): [#def27]
perl-5.42.1/dist/Time-HiRes/tmp23106.c: scope_hint: In function ‘main’
perl-5.42.1/dist/Time-HiRes/tmp23106.c:14:5: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   14 |     read(0, buf, 0); /* Assuming reading nothing updates atime (the [0]) */
#      |     ^~~~~~~~~~~~~~~

Error: COMPILER_WARNING: [#def28]
perl-5.42.1/dist/Time-HiRes/tmp23106.c:16:17: warning[-Wunused-but-set-variable=]: variable ‘st’ set but not used
#   16 |     struct stat st;
#      |                 ^~

Error: GCC_ANALYZER_WARNING (CWE-457): [#def29]
perl-5.42.1/dist/Time-HiRes/tmp23106.c:16:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ts1[0].tv_nsec’
perl-5.42.1/dist/Time-HiRes/tmp23106.c:16:5: branch_true: following ‘true’ branch...
perl-5.42.1/dist/Time-HiRes/tmp23106.c:16:32: branch_true: ...to here
perl-5.42.1/dist/Time-HiRes/tmp23106.c:16:32: danger: use of uninitialized value ‘ts1[0].tv_nsec’ here

Error: COMPILER_WARNING: [#def30] [important]
perl-5.42.1/dist/Time-HiRes/tmp23106.c:17:7: error[error]: ‘struct stat’ has no member named ‘st_atimensec’

Error: COMPILER_WARNING: [#def31] [important]
perl-5.42.1/dist/Time-HiRes/tmp23106.c:17:7: error[error]: ‘struct stat’ has no member named ‘st_atimespec’

Error: COMPILER_WARNING: [#def32] [important]
perl-5.42.1/dist/Time-HiRes/tmp23106.c:17:8: error[error]: ‘struct stat’ has no member named ‘st_atime_n’; did you mean ‘st_atim’?

Error: CPPCHECK_WARNING (CWE-476): [#def33]
perl-5.42.1/ext/B/B.xs:423: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(kid)
#  421|   	    if (o->op_flags & OPf_STACKED && o->op_flags & OPf_SPECIAL) {
#  422|   		OP *kid = OpSIBLING(cLISTOPo->op_first);   /* pass pushmark */
#  423|-> 		kid = kUNOP->op_first;                      /* pass rv2gv */
#  424|   		kid = kUNOP->op_first;                      /* pass leave */
#  425|   		SP = oplist(aTHX_ kid->op_next, SP);

Error: CPPCHECK_WARNING (CWE-476): [#def34]
perl-5.42.1/ext/re/re_comp_debug.c:235: warning[nullPointer]: Possible null pointer dereference: ac
#  233|                  NULL;
#  234|               const reg_trie_data * const trie =
#  235|->                 (reg_trie_data*)ri->data->data[op < AHOCORASICK ? n : ac->trie];
#  236|   #ifdef DEBUGGING
#  237|               AV *const trie_words

Error: CPPCHECK_WARNING (CWE-476): [#def35]
perl-5.42.1/ext/re/re_comp_debug.c:585: warning[nullPointer]: Possible null pointer dereference: ac
#  583|                  NULL;
#  584|           const reg_trie_data * const trie
#  585|->             = (reg_trie_data*)progi->data->data[!IS_TRIE_AC(op) ? n : ac->trie];
#  586|   
#  587|           sv_catpvf(sv, "-%s", REGNODE_NAME(FLAGS(o)));

Error: CPPCHECK_WARNING (CWE-476): [#def36]
perl-5.42.1/ext/re/re_comp_trie.c:1662: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: (struct tregnode_TRIE*)(op)
# 1660|           tregnode_TRIE *op = (tregnode_TRIE *)
# 1661|               PerlMemShared_calloc(1, sizeof(tregnode_TRIE));
# 1662|->         StructCopy(source, op, tregnode_TRIE);
# 1663|           stclass = (regnode *)op;
# 1664|       } else {

Error: CPPCHECK_WARNING (CWE-476): [#def37]
perl-5.42.1/ext/re/re_comp_trie.c:1667: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: (struct tregnode_TRIEC*)(op)
# 1665|           tregnode_TRIEC *op = (tregnode_TRIEC *)
# 1666|               PerlMemShared_calloc(1, sizeof(tregnode_TRIEC));
# 1667|->         StructCopy(source, op, tregnode_TRIEC);
# 1668|           stclass = (regnode *)op;
# 1669|       }

Error: CPPCHECK_WARNING (CWE-476): [#def38]
perl-5.42.1/ext/re/re_comp_trie.c:1670: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: stclass
# 1668|           stclass = (regnode *)op;
# 1669|       }
# 1670|->     OP(stclass)+=2; /* convert the TRIE type to its AHO-CORASICK equivalent */
# 1671|   
# 1672|       ARG1u_SET( stclass, data_slot );

Error: CPPCHECK_WARNING (CWE-476): [#def39]
perl-5.42.1/ext/re/re_comp_trie.c:1672: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: (struct regnode_1*)stclass
# 1670|       OP(stclass)+=2; /* convert the TRIE type to its AHO-CORASICK equivalent */
# 1671|   
# 1672|->     ARG1u_SET( stclass, data_slot );
# 1673|       aho = (reg_ac_data *) PerlMemShared_calloc( 1, sizeof(reg_ac_data) );
# 1674|       RExC_rxi->data->data[ data_slot ] = (void*)aho;

Error: CPPCHECK_WARNING (CWE-476): [#def40]
perl-5.42.1/ext/re/re_comp_trie.c:1675: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aho
# 1673|       aho = (reg_ac_data *) PerlMemShared_calloc( 1, sizeof(reg_ac_data) );
# 1674|       RExC_rxi->data->data[ data_slot ] = (void*)aho;
# 1675|->     aho->trie = trie_offset;
# 1676|       aho->states = (reg_trie_state *)PerlMemShared_malloc( numstates * sizeof(reg_trie_state) );
# 1677|       Copy( trie->states, aho->states, numstates, reg_trie_state );

Error: CPPCHECK_WARNING (CWE-476): [#def41]
perl-5.42.1/ext/re/re_comp_trie.c:1676: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aho
# 1674|       RExC_rxi->data->data[ data_slot ] = (void*)aho;
# 1675|       aho->trie = trie_offset;
# 1676|->     aho->states = (reg_trie_state *)PerlMemShared_malloc( numstates * sizeof(reg_trie_state) );
# 1677|       Copy( trie->states, aho->states, numstates, reg_trie_state );
# 1678|       Newx( q, numstates, U32);

Error: CPPCHECK_WARNING (CWE-476): [#def42]
perl-5.42.1/hv.c:3904: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 3902|   #endif
# 3903|   
# 3904|->     he->refcounted_he_next = parent;
# 3905|   
# 3906|       if (is_pv) {

Error: CPPCHECK_WARNING (CWE-476): [#def43]
perl-5.42.1/hv.c:3910: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 3908|           he->refcounted_he_val.refcounted_he_u_len = value_len;
# 3909|       } else if (value_type == HVrhek_IV) {
# 3910|->         he->refcounted_he_val.refcounted_he_u_iv = SvIVX(value);
# 3911|       } else if (value_type == HVrhek_UV) {
# 3912|           he->refcounted_he_val.refcounted_he_u_uv = SvUVX(value);

Error: CPPCHECK_WARNING (CWE-476): [#def44]
perl-5.42.1/hv.c:3912: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 3910|           he->refcounted_he_val.refcounted_he_u_iv = SvIVX(value);
# 3911|       } else if (value_type == HVrhek_UV) {
# 3912|->         he->refcounted_he_val.refcounted_he_u_uv = SvUVX(value);
# 3913|       }
# 3914|   

Error: CPPCHECK_WARNING (CWE-476): [#def45]
perl-5.42.1/hv.c:3916: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 3914|   
# 3915|   #ifdef USE_ITHREADS
# 3916|->     he->refcounted_he_hash = hash;
# 3917|       he->refcounted_he_keylen = keylen;
# 3918|       Copy(keypv, he->refcounted_he_data + key_offset, keylen, char);

Error: CPPCHECK_WARNING (CWE-476): [#def46]
perl-5.42.1/hv.c:3917: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 3915|   #ifdef USE_ITHREADS
# 3916|       he->refcounted_he_hash = hash;
# 3917|->     he->refcounted_he_keylen = keylen;
# 3918|       Copy(keypv, he->refcounted_he_data + key_offset, keylen, char);
# 3919|   #else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
perl-5.42.1/inline.h:61:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘av’
perl-5.42.1/perl.c:5132:1: enter_function: entry to ‘S_incpush’
perl-5.42.1/perl.c:5165:24: branch_false: following ‘false’ branch (when ‘using_sub_dirs == 0’)...
perl-5.42.1/perl.c:5211:12: branch_false: ...to here
perl-5.42.1/perl.c:5211:12: branch_true: following ‘true’ branch (when ‘unshift != 0’)...
perl-5.42.1/perl.c:5215:28: branch_true: ...to here
perl-5.42.1/perl.c:5215:28: call_function: calling ‘Perl_av_count’ from ‘S_incpush’
#   59|       assert(SvTYPE(av) == SVt_PVAV);
#   60|   
#   61|->     return AvFILL(av) + 1;
#   62|   }
#   63|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def48]
perl-5.42.1/locale.c:3427:24: warning[-Wanalyzer-null-argument]: use of NULL ‘failed’ where non-null expected
perl-5.42.1/locale.c:3667:1: enter_function: entry to ‘S_new_ctype’
perl-5.42.1/locale.c:3705:9: branch_false: following ‘false’ branch (when the strings are non-equal)...
perl-5.42.1/locale.c:3714:31: branch_false: ...to here
perl-5.42.1/locale.c:3714:31: call_function: calling ‘S_is_locale_utf8’ from ‘S_new_ctype’
# 3425|        * locale is UTF-8, so just dumps bytes.  Actually figuring it out can be
# 3426|        * too complicated for a panic situation. */
# 3427|->     const char * msg = form(
# 3428|                               "Can't change locale for %s (%d) from '%s' to '%s'"
# 3429|                               " %s",

Error: CPPCHECK_WARNING (CWE-119): [#def49]
perl-5.42.1/mro_core.c:811: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: (const void*)((*namep)->hek_key)
#  809|       }
#  810|       if (name_count == 1) {
#  811|->         if (memEQs(HEK_KEY(*namep), HEK_LEN(*namep), "main")) {
#  812|               namesv = GvNAMELEN(gv) == 1
#  813|                   ? newSVpvs_flags(":", SVs_TEMP)

Error: CPPCHECK_WARNING (CWE-119): [#def50]
perl-5.42.1/mro_core.c:833: error[bufferAccessOutOfBounds]: Buffer is accessed out of bounds: (const void*)((*namep)->hek_key)
#  831|           namesv = newSV_type_mortal(SVt_PVAV);
#  832|           while (name_count--) {
#  833|->             if(memEQs(HEK_KEY(*namep), HEK_LEN(*namep), "main")){
#  834|                   aname = GvNAMELEN(gv) == 1
#  835|                            ? newSVpvs(":")

Error: CPPCHECK_WARNING (CWE-476): [#def51]
perl-5.42.1/op.c:1802: warning[nullPointer]: Possible null pointer dereference: o
# 1800|           /* Descend down the tree looking for any unprocessed subtrees to
# 1801|            * do first */
# 1802|->         if (!o->op_next) {
# 1803|               if (o->op_flags & OPf_KIDS) {
# 1804|                   o = cUNOPo->op_first;

Error: CPPCHECK_WARNING (CWE-476): [#def52]
perl-5.42.1/op.c:2946: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(0+(((struct UNOP*)(kid))->op_first)->op_moresib?(((struct UNOP*)(kid))->op_first)->op_sibparent:NULL)
# 2944|               kid = cUNOPo->op_first;
# 2945|               if (kid->op_type == OP_NULL)
# 2946|->                 kid = cUNOPx(OpSIBLING(kUNOP->op_first))
# 2947|                       ->op_first;
# 2948|               o->op_private = OPpLVREF_CV;

Error: CPPCHECK_WARNING (CWE-476): [#def53]
perl-5.42.1/op.c:3765: warning[nullPointer]: Possible null pointer dereference: o
# 3763|               o = OpSIBLING(cUNOPo->op_first);
# 3764|               doref(o, type, set_op_ref);
# 3765|->             o = OpSIBLING(o);
# 3766|               continue;
# 3767|   

Error: CPPCHECK_WARNING (CWE-476): [#def54]
perl-5.42.1/op.c:4992: warning[nullPointer]: Possible null pointer dereference: (struct SVOP*)(0+(((struct LISTOP*)(o))->op_first)->op_moresib?(((struct LISTOP*)(o))->op_first)->op_sibparent:NULL)
# 4990|               goto nope;
# 4991|           {
# 4992|->             SV * const sv = cSVOPx_sv(OpSIBLING(cLISTOPo->op_first));
# 4993|               if (!SvPOK(sv) || SvGMAGICAL(sv)) goto nope;
# 4994|               {

Error: CPPCHECK_WARNING (CWE-562): [#def55]
perl-5.42.1/op.c:5048: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5046|       assert(PL_curcop == &PL_compiling);
# 5047|       StructCopy(&PL_compiling, &not_compiling, COP);
# 5048|->     PL_curcop = &not_compiling;
# 5049|       /* The above ensures that we run with all the correct hints of the
# 5050|          currently compiling COP, but that IN_PERL_RUNTIME is true. */

Error: CPPCHECK_WARNING (CWE-562): [#def56]
perl-5.42.1/op.c:5170: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5168|       old_curcop = PL_curcop;
# 5169|       StructCopy(old_curcop, &not_compiling, COP);
# 5170|->     PL_curcop = &not_compiling;
# 5171|       /* The above ensures that we run with all the correct hints of the
# 5172|          current COP, but that IN_PERL_RUNTIME is true. */

Error: CPPCHECK_WARNING (CWE-562): [#def57]
perl-5.42.1/op.c:5176: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5174|       PL_warnhook = PERL_WARNHOOK_FATAL;
# 5175|       PL_diehook  = NULL;
# 5176|->     JMPENV_PUSH(ret);
# 5177|   
# 5178|       /* Effective $^W=1.  */

Error: CPPCHECK_WARNING (CWE-476): [#def58]
perl-5.42.1/op.c:7367: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tbl
# 7365|   
# 7366|           tbl = (OPtrans_map*)PerlMemShared_calloc(struct_size, 1);
# 7367|->         tbl->size = 256;
# 7368|           cPVOPo->op_pv = (char*)tbl;
# 7369|   

Error: CPPCHECK_WARNING (CWE-476): [#def59]
perl-5.42.1/op.c:7378: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tbl
# 7376|   
# 7377|               /* Any code points above our limit should be irrelevant */
# 7378|->             if (t_array[i] >= tbl->size) break;
# 7379|   
# 7380|               /* Set up the map */

Error: CPPCHECK_WARNING (CWE-476): [#def60]
perl-5.42.1/op.c:8580: warning[nullPointer]: Possible null pointer dereference: sib
# 8578|           OP * const sib = OpSIBLING(cLOGOPo->op_first);
# 8579|           const I32 t = assignment_type(sib);
# 8580|->         const I32 f = assignment_type(OpSIBLING(sib));
# 8581|   
# 8582|           if (t == ASSIGN_LIST && f == ASSIGN_LIST)

Error: CPPCHECK_WARNING (CWE-476): [#def61]
perl-5.42.1/op.c:12928: warning[nullPointer]: Possible null pointer dereference: catchroot
#12926|       /* First, link up the actual body of the catch block */
#12927|       catchroot = OpSIBLING(cUNOPx(catchkid)->op_first);
#12928|->     catchstart = LINKLIST(catchroot);
#12929|       cLOGOPx(catchkid)->op_other = catchstart;
#12930|   

Error: CPPCHECK_WARNING (CWE-476): [#def62]
perl-5.42.1/op.c:12940: warning[nullPointer]: Possible null pointer dereference: catchroot
#12938|   
#12939|       /* after catch block, skip back up to the leavetrycatch */
#12940|->     catchroot->op_next = o;
#12941|   
#12942|       return o;

Error: CPPCHECK_WARNING (CWE-476): [#def63]
perl-5.42.1/op.c:12954: warning[nullPointer]: Possible null pointer dereference: kid
#12952|           o = ck_fun(o);
#12953|           kid = OpSIBLING(cUNOPo->op_first);
#12954|->         if (kid->op_type == OP_RV2GV)
#12955|               op_null(kid);
#12956|       }

Error: CPPCHECK_WARNING (CWE-476): [#def64]
perl-5.42.1/op.c:13503: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(0+(((struct LISTOP*)(o))->op_first)->op_moresib?(((struct LISTOP*)(o))->op_first)->op_sibparent:NULL)
#13501|   
#13502|       if (o->op_flags & OPf_STACKED) {
#13503|->         kid = cUNOPx(OpSIBLING(cLISTOPo->op_first))->op_first;
#13504|           if (kid->op_type != OP_SCOPE && kid->op_type != OP_LEAVE)
#13505|               return no_fh_allowed(o);

Error: CPPCHECK_WARNING (CWE-476): [#def65]
perl-5.42.1/op.c:13517: warning[nullPointer]: Possible null pointer dereference: kid
#13515|           return o;
#13516|       kid = OpSIBLING(cLISTOPo->op_first);
#13517|->     if (kid->op_type != OP_NULL)
#13518|           croak("panic: ck_grep, type=%u", (unsigned) kid->op_type);
#13519|       kid = kUNOP->op_first;

Error: CPPCHECK_WARNING (CWE-476): [#def66]
perl-5.42.1/op.c:13527: warning[nullPointer]: Possible null pointer dereference: kid
#13525|   
#13526|       kid = OpSIBLING(cLISTOPo->op_first);
#13527|->     for (kid = OpSIBLING(kid); kid; kid = OpSIBLING(kid))
#13528|           op_lvalue(kid, OP_GREPSTART);
#13529|   

Error: CPPCHECK_WARNING (CWE-476): [#def67]
perl-5.42.1/op.c:13976: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(kidparent)
#13974|           OP * const kidparent =
#13975|               OpSIBLING(cUNOPx(cUNOPx(varop)->op_first)->op_first);
#13976|->         OP * const kid = cUNOPx(kidparent)->op_first;
#13977|           o->op_private |= OPpLVREF_CV;
#13978|           if (kid->op_type == OP_GV) {

Error: CPPCHECK_WARNING (CWE-476): [#def68]
perl-5.42.1/op.c:14151: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(0+(((struct LISTOP*)(o))->op_first)->op_moresib?(((struct LISTOP*)(o))->op_first)->op_sibparent:NULL)
#14149|   
#14150|       if (o->op_flags & OPf_STACKED) {
#14151|->         kid = cUNOPx(OpSIBLING(cLISTOPo->op_first))->op_first;
#14152|           if (kid->op_type != OP_SCOPE && kid->op_type != OP_LEAVE)
#14153|               yyerror("Missing comma after first argument to return");

Error: CPPCHECK_WARNING (CWE-476): [#def69]
perl-5.42.1/op.c:14306: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(kid)
#14304|       PERL_ARGS_ASSERT_SIMPLIFY_SORT;
#14305|   
#14306|->     kid = kUNOP->op_first;				/* get past null */
#14307|       if (!(have_scopeop = kid->op_type == OP_SCOPE)
#14308|        && kid->op_type != OP_LEAVE)

Error: CPPCHECK_WARNING (CWE-476): [#def70]
perl-5.42.1/op.c:14480: warning[nullPointer]: Possible null pointer dereference: kid
#14478|       OP * const kid = OpSIBLING(cUNOPo->op_first);
#14479|       PERL_ARGS_ASSERT_CK_STRINGIFY;
#14480|->     if ((   kid->op_type == OP_JOIN || kid->op_type == OP_QUOTEMETA
#14481|            || kid->op_type == OP_LC   || kid->op_type == OP_LCFIRST
#14482|            || kid->op_type == OP_UC   || kid->op_type == OP_UCFIRST)

Error: CPPCHECK_WARNING (CWE-476): [#def71]
perl-5.42.1/op.c:15702: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(0+(((struct UNOP*)(o))->op_first)->op_moresib?(((struct UNOP*)(o))->op_first)->op_sibparent:NULL)
#15700|   
#15701|       assert(OpSIBLING(cUNOPo->op_first)->op_type == OP_NULL);
#15702|->     oleft_pushmark = cUNOPx(OpSIBLING(cUNOPo->op_first))->op_first;
#15703|       assert(oleft_pushmark->op_type == OP_PUSHMARK);
#15704|       oleft = OpSIBLING(oleft_pushmark);

Error: CPPCHECK_WARNING (CWE-401): [#def72]
perl-5.42.1/op.c:16369: error[memleak]: Memory leak: rcpv
#16367|       }
#16368|       rcpv->pv[len-1]= '\0'; /* the last byte should always be null */
#16369|->     return rcpv->pv;
#16370|   }
#16371|   

Error: CPPCHECK_WARNING (CWE-476): [#def73]
perl-5.42.1/op.c:16635: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#16633|           PerlMemShared_malloc( sizeof(struct op_argcheck_aux));
#16634|   
#16635|->     aux->params     = signature->elems;
#16636|       aux->opt_params = signature->optelems;
#16637|       aux->slurpy     = signature->slurpy;

Error: CPPCHECK_WARNING (CWE-476): [#def74]
perl-5.42.1/op.c:16636: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#16634|   
#16635|       aux->params     = signature->elems;
#16636|->     aux->opt_params = signature->optelems;
#16637|       aux->slurpy     = signature->slurpy;
#16638|   

Error: CPPCHECK_WARNING (CWE-476): [#def75]
perl-5.42.1/op.c:16637: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#16635|       aux->params     = signature->elems;
#16636|       aux->opt_params = signature->optelems;
#16637|->     aux->slurpy     = signature->slurpy;
#16638|   
#16639|       OP *check = newUNOP_AUX(OP_ARGCHECK, 0, NULL, (UNOP_AUX_item *)aux);

Error: CPPCHECK_WARNING (CWE-682): [#def76]
perl-5.42.1/peep.c:731: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  729|            * the sizes of the const string segments in the aux struct */
#  730|           char *q, *oldq;
#  731|->         lenp = aux + PERL_MULTICONCAT_IX_LENGTHS;
#  732|   
#  733|           p    = sprintf_info.start;

Error: CPPCHECK_WARNING (CWE-682): [#def77]
perl-5.42.1/peep.c:766: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
#  764|       else {
#  765|           p = const_str;
#  766|->         lenp = aux + PERL_MULTICONCAT_IX_LENGTHS;
#  767|   
#  768|           lenp->ssize = -1;

Error: CPPCHECK_WARNING (CWE-476): [#def78]
perl-5.42.1/peep.c:860: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#  858|       /* Populate the aux struct */
#  859|   
#  860|->     aux[PERL_MULTICONCAT_IX_NARGS].ssize     = nargs;
#  861|       aux[PERL_MULTICONCAT_IX_PLAIN_PV].pv    = utf8 ? NULL : const_str;
#  862|       aux[PERL_MULTICONCAT_IX_PLAIN_LEN].ssize = utf8 ?    0 : total_len;

Error: CPPCHECK_WARNING (CWE-476): [#def79]
perl-5.42.1/peep.c:861: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#  859|   
#  860|       aux[PERL_MULTICONCAT_IX_NARGS].ssize     = nargs;
#  861|->     aux[PERL_MULTICONCAT_IX_PLAIN_PV].pv    = utf8 ? NULL : const_str;
#  862|       aux[PERL_MULTICONCAT_IX_PLAIN_LEN].ssize = utf8 ?    0 : total_len;
#  863|       aux[PERL_MULTICONCAT_IX_UTF8_PV].pv     = const_str;

Error: CPPCHECK_WARNING (CWE-476): [#def80]
perl-5.42.1/peep.c:862: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#  860|       aux[PERL_MULTICONCAT_IX_NARGS].ssize     = nargs;
#  861|       aux[PERL_MULTICONCAT_IX_PLAIN_PV].pv    = utf8 ? NULL : const_str;
#  862|->     aux[PERL_MULTICONCAT_IX_PLAIN_LEN].ssize = utf8 ?    0 : total_len;
#  863|       aux[PERL_MULTICONCAT_IX_UTF8_PV].pv     = const_str;
#  864|       aux[PERL_MULTICONCAT_IX_UTF8_LEN].ssize  = total_len;

Error: CPPCHECK_WARNING (CWE-476): [#def81]
perl-5.42.1/peep.c:863: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#  861|       aux[PERL_MULTICONCAT_IX_PLAIN_PV].pv    = utf8 ? NULL : const_str;
#  862|       aux[PERL_MULTICONCAT_IX_PLAIN_LEN].ssize = utf8 ?    0 : total_len;
#  863|->     aux[PERL_MULTICONCAT_IX_UTF8_PV].pv     = const_str;
#  864|       aux[PERL_MULTICONCAT_IX_UTF8_LEN].ssize  = total_len;
#  865|   

Error: CPPCHECK_WARNING (CWE-476): [#def82]
perl-5.42.1/peep.c:864: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#  862|       aux[PERL_MULTICONCAT_IX_PLAIN_LEN].ssize = utf8 ?    0 : total_len;
#  863|       aux[PERL_MULTICONCAT_IX_UTF8_PV].pv     = const_str;
#  864|->     aux[PERL_MULTICONCAT_IX_UTF8_LEN].ssize  = total_len;
#  865|   
#  866|       /* if variant > 0, calculate a variant const string and lengths where

Error: CPPCHECK_WARNING (CWE-476): [#def83]
perl-5.42.1/peep.c:1325: warning[nullPointer]: Possible null pointer dereference: kid
# 1323|                   kid = OpSIBLING(cLISTOPo->op_first);
# 1324|               if (/* I bet there's always a pushmark... */
# 1325|->                 OP_TYPE_ISNT_AND_WASNT_NN(kid, OP_LIST)
# 1326|                   && OP_TYPE_ISNT_NN(kid, OP_CONST))
# 1327|               {

Error: CPPCHECK_WARNING (CWE-476): [#def84]
perl-5.42.1/peep.c:2544: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: arg_buf
# 2542|               /* for dumping etc: store the length in a hidden first slot;
# 2543|                * we set the op_aux pointer to the second slot */
# 2544|->             arg_buf->uv = size;
# 2545|               arg_buf++;
# 2546|           }

Error: CPPCHECK_WARNING (CWE-682): [#def85]
perl-5.42.1/peep.c:2545: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 2543|                * we set the op_aux pointer to the second slot */
# 2544|               arg_buf->uv = size;
# 2545|->             arg_buf++;
# 2546|           }
# 2547|       } /* for (pass = ...) */

Error: CPPCHECK_WARNING (CWE-682): [#def86]
perl-5.42.1/perl.c:1694: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1692|           (sizeof(char*) * (n_entries + 1)) + vars_size
# 1693|       );
# 1694|->     char *vars = (char*)(new_environ + n_entries + 1);
# 1695|   
# 1696|       for (size_t i = 0, copied = 0; n_entries > i; ++i) {

Error: CPPCHECK_WARNING (CWE-562): [#def87]
perl-5.42.1/perl.c:1930: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1928|       PL_dowarn = G_WARN_OFF;
# 1929|   
# 1930|->     JMPENV_PUSH(ret);
# 1931|       switch (ret) {
# 1932|       case 0:

Error: GCC_ANALYZER_WARNING (CWE-835): [#def88]
perl-5.42.1/perl.c:2407:16: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.42.1/perl.c:2407:16: danger: infinite loop here
perl-5.42.1/perl.c:2407:16: branch_true: if it ever follows ‘true’ branch, it will always do so...
perl-5.42.1/perl.c:2408:13: branch_true: ...to here
# 2405|           (s = PerlEnv_getenv("PERL5OPT")))
# 2406|       {
# 2407|->         while (isSPACE(*s))
# 2408|               s++;
# 2409|           if (*s == '-' && *(s+1) == 'T') {

Error: CPPCHECK_WARNING (CWE-562): [#def89]
perl-5.42.1/perl.c:2792: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2790|   #endif
# 2791|   
# 2792|->     JMPENV_PUSH(ret);
# 2793|       switch (ret) {
# 2794|       case 1:

Error: CPPCHECK_WARNING (CWE-562): [#def90]
perl-5.42.1/perl.c:3199: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3197|       myop.op_type = OP_ENTERSUB;
# 3198|       SAVEOP();
# 3199|->     PL_op = (OP*)&myop;
# 3200|   
# 3201|       if (!(flags & G_METHOD_NAMED)) {

Error: CPPCHECK_WARNING (CWE-562): [#def91]
perl-5.42.1/perl.c:3223: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3221|           Zero(&method_op, 1, METHOP);
# 3222|           method_op.op_next = (OP*)&myop;
# 3223|->         PL_op = (OP*)&method_op;
# 3224|           if ( flags & G_METHOD_NAMED ) {
# 3225|               method_op.op_ppaddr = PL_ppaddr[OP_METHOD_NAMED];

Error: CPPCHECK_WARNING (CWE-562): [#def92]
perl-5.42.1/perl.c:3248: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3246|           INCMARK;
# 3247|   
# 3248|->         JMPENV_PUSH(ret);
# 3249|   
# 3250|           switch (ret) {

Error: CPPCHECK_WARNING (CWE-562): [#def93]
perl-5.42.1/perl.c:3387: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3385|       TAINT_PROPER("eval_sv()");
# 3386|   
# 3387|->     JMPENV_PUSH(ret);
# 3388|       switch (ret) {
# 3389|       case 0:

Error: CPPCHECK_WARNING (CWE-562): [#def94]
perl-5.42.1/perl.c:5319: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5317|               SAVEFREESV(cv);
# 5318|           }
# 5319|->         JMPENV_PUSH(ret);
# 5320|           switch (ret) {
# 5321|           case 0:

Error: CPPCHECK_WARNING (CWE-457): [#def95]
perl-5.42.1/perlio.c:2375: warning[uninitvar]: Uninitialized variable: buf
# 2373|       }
# 2374|       *s = '\0';
# 2375|->     return buf;
# 2376|   }
# 2377|   

Error: CPPCHECK_WARNING (CWE-404): [#def96]
perl-5.42.1/perlio.c:3449: error[resourceLeak]: Resource leak: stdio
# 3447|                                   s->stdio);
# 3448|           if (!s->stdio)
# 3449|->             return NULL;
# 3450|           s->stdio = stdio;
# 3451|           fd = fileno(stdio);

Error: CPPCHECK_WARNING (CWE-664): [#def97]
perl-5.42.1/perlio.c:5403: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5401|   #ifdef NEED_VA_COPY
# 5402|       va_list apc;
# 5403|->     Perl_va_copy(ap, apc);
# 5404|       sv = vnewSVpvf(fmt, &apc);
# 5405|       va_end(apc);

Error: CPPCHECK_WARNING (CWE-664): [#def98]
perl-5.42.1/perlio.c:5404: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5402|       va_list apc;
# 5403|       Perl_va_copy(ap, apc);
# 5404|->     sv = vnewSVpvf(fmt, &apc);
# 5405|       va_end(apc);
# 5406|   #else

Error: CPPCHECK_WARNING (CWE-664): [#def99]
perl-5.42.1/perlio.c:5405: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5403|       Perl_va_copy(ap, apc);
# 5404|       sv = vnewSVpvf(fmt, &apc);
# 5405|->     va_end(apc);
# 5406|   #else
# 5407|       sv = vnewSVpvf(fmt, &ap);

Error: COMPILER_WARNING: [#def100]
perl-5.42.1/pp_ctl.c:94:44: warning: missing terminating ' character
#   94 |     REGEXP *re = NULL;
#      |                                            ^
#   92|       SV **args;
#   93|       int nargs;
#   94|->     REGEXP *re = NULL;
#   95|       REGEXP *new_re;
#   96|       const regexp_engine *eng;

Error: CPPCHECK_WARNING (CWE-562): [#def101]
perl-5.42.1/pp_ctl.c:3457: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3455|                                     (fake_goto_op.op_flags & ~OPf_WANT)
# 3456|                                   | (cx->blk_gimme & G_WANT);
# 3457|->                 PL_op = (OP*)&fake_goto_op;
# 3458|   
# 3459|                   /* XS subs don't have a CXt_SUB, so pop it;

Error: CPPCHECK_WARNING (CWE-562): [#def102]
perl-5.42.1/pp_ctl.c:3830: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3828|   
# 3829|       assert(CATCH_GET);
# 3830|->     JMPENV_PUSH(ret);
# 3831|       assert(!CATCH_GET);
# 3832|   

Error: CPPCHECK_WARNING (CWE-562): [#def103]
perl-5.42.1/pp_ctl.c:3973: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3971|   
# 3972|       assert(CxTYPE(CX_CUR()) == CXt_EVAL);
# 3973|->     JMPENV_PUSH(ret);
# 3974|       switch (ret) {
# 3975|       case 0:

Error: CPPCHECK_WARNING (CWE-562): [#def104]
perl-5.42.1/pp_ctl.c:4031: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4029|   
# 4030|       assert(CxTYPE(CX_CUR()) == CXt_EVAL);
# 4031|->     JMPENV_PUSH(ret);
# 4032|       switch (ret) {
# 4033|       case 0:

Error: CPPCHECK_WARNING (CWE-562): [#def105]
perl-5.42.1/pp_ctl.c:6488: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6486|       dJMPENV;
# 6487|       int ret;
# 6488|->     JMPENV_PUSH(ret);
# 6489|       switch (ret) {
# 6490|       case 0: /* normal start */

Error: CPPCHECK_WARNING (CWE-457): [#def106]
perl-5.42.1/pp_pack.c:1575: warning[uninitvar]: Uninitialized variable: aptr
# 1573|                   SHIFT_VAR(utf8, s, strend, aptr, datumtype, needs_swap);
# 1574|                   /* newSVpv generates undef if aptr is NULL */
# 1575|->                 mPUSHs(newSVpv(aptr, 0));
# 1576|               }
# 1577|               break;

Error: CPPCHECK_WARNING (CWE-457): [#def107]
perl-5.42.1/pp_pack.c:1630: warning[uninitvar]: Uninitialized variable: aptr
# 1628|                   SHIFT_VAR(utf8, s, strend, aptr, datumtype, needs_swap);
# 1629|                   /* newSVpvn generates undef if aptr is NULL */
# 1630|->                 PUSHs(newSVpvn_flags(aptr, len, SVs_TEMP));
# 1631|               }
# 1632|               break;

Error: CPPCHECK_WARNING (CWE-457): [#def108]
perl-5.42.1/pp_pack.c:3105: error[uninitvar]: Uninitialized variable: buffer
# 3103|                   if (from_utf8) {
# 3104|                       char buffer[64];
# 3105|->                     if (!S_utf8_to_bytes(aTHX_ &aptr, aend, buffer, todo,
# 3106|                                         'u' | TYPE_IS_PACK)) {
# 3107|                           *cur = '\0';

Error: GCC_ANALYZER_WARNING (CWE-476): [#def109]
perl-5.42.1/regcomp_trie.c:1301:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*trie.trans + (long unsigned int)zp * 8’
perl-5.42.1/regcomp_trie.c:549:1: enter_function: entry to ‘Perl_make_trie’
perl-5.42.1/regcomp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘Perl_make_trie’
perl-5.42.1/regcomp_trie.c:556:22: return_function: returning to ‘Perl_make_trie’ from ‘Perl_newSV_type’
perl-5.42.1/regcomp_trie.c:662:25: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.42.1/regcomp_trie.c:839:26: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:877:5: branch_false: following ‘false’ branch...
perl-5.42.1/regcomp_trie.c:877:5: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:881:55: call_function: calling ‘Perl_SvIV’ from ‘Perl_make_trie’
perl-5.42.1/regcomp_trie.c:881:55: return_function: returning to ‘Perl_make_trie’ from ‘Perl_SvIV’
perl-5.42.1/regcomp_trie.c:880:8: branch_false: following ‘false’ branch...
perl-5.42.1/regcomp_trie.c:1127:13: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:1127:13: acquire_memory: this call could return NULL
perl-5.42.1/regcomp_trie.c:1136:29: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.42.1/regcomp_trie.c:1273:31: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:1278:27: branch_true: following ‘true’ branch (when ‘state < laststate’)...
perl-5.42.1/regcomp_trie.c:1280:34: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1286:19: branch_true: following ‘true’ branch...
perl-5.42.1/regcomp_trie.c:1289:20: branch_false: following ‘false’ branch (when ‘flag == 0’)...
perl-5.42.1/regcomp_trie.c:1289:30: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:1289:22: branch_true: following ‘true’ branch...
perl-5.42.1/regcomp_trie.c:1290:26: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1290:24: branch_true: following ‘true’ branch...
perl-5.42.1/regcomp_trie.c:1291:28: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1291:28: branch_true: following ‘true’ branch (when ‘o_used == 1’)...
perl-5.42.1/regcomp_trie.c:1291:28: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1292:37: branch_false: following ‘false’ branch (when ‘pos <= zp’)...
perl-5.42.1/regcomp_trie.c:1298:55: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:1302:35: branch_true: following ‘true’ branch...
perl-5.42.1/regcomp_trie.c:1302:35: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1301:29: danger: ‘*trie.trans + (long unsigned int)zp * 8’ could be NULL: unchecked value from [(24)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/23)
# 1299|                                                         + trie->uniquecharcount
# 1300|                                                         - charid ;
# 1301|->                             trie->trans[ zp ].next
# 1302|                                   = SAFE_TRIE_NODENUM( trie->trans[ stateidx
# 1303|                                                                + charid ].next );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def110]
perl-5.42.1/regcomp_trie.c:1315:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*trie.trans + (long unsigned int)pos * 8’
perl-5.42.1/regcomp_trie.c:549:1: enter_function: entry to ‘Perl_make_trie’
perl-5.42.1/regcomp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘Perl_make_trie’
perl-5.42.1/regcomp_trie.c:556:22: return_function: returning to ‘Perl_make_trie’ from ‘Perl_newSV_type’
perl-5.42.1/regcomp_trie.c:662:25: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.42.1/regcomp_trie.c:839:26: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:877:5: branch_false: following ‘false’ branch...
perl-5.42.1/regcomp_trie.c:877:5: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:881:55: call_function: calling ‘Perl_SvIV’ from ‘Perl_make_trie’
perl-5.42.1/regcomp_trie.c:881:55: return_function: returning to ‘Perl_make_trie’ from ‘Perl_SvIV’
perl-5.42.1/regcomp_trie.c:880:8: branch_false: following ‘false’ branch...
perl-5.42.1/regcomp_trie.c:1127:13: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:1127:13: acquire_memory: this call could return NULL
perl-5.42.1/regcomp_trie.c:1136:29: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.42.1/regcomp_trie.c:1273:31: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:1278:27: branch_true: following ‘true’ branch (when ‘state < laststate’)...
perl-5.42.1/regcomp_trie.c:1280:34: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1286:19: branch_true: following ‘true’ branch...
perl-5.42.1/regcomp_trie.c:1289:20: branch_false: following ‘false’ branch (when ‘flag == 0’)...
perl-5.42.1/regcomp_trie.c:1289:30: branch_false: ...to here
perl-5.42.1/regcomp_trie.c:1289:22: branch_true: following ‘true’ branch...
perl-5.42.1/regcomp_trie.c:1290:26: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1310:24: branch_true: following ‘true’ branch (when ‘flag == 0’)...
perl-5.42.1/regcomp_trie.c:1313:42: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1316:27: branch_true: following ‘true’ branch...
perl-5.42.1/regcomp_trie.c:1316:27: branch_true: ...to here
perl-5.42.1/regcomp_trie.c:1315:21: danger: ‘*trie.trans + (long unsigned int)pos * 8’ could be NULL: unchecked value from [(24)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/23)
# 1313|                                          = pos + trie->uniquecharcount - charid ;
# 1314|                       }
# 1315|->                     trie->trans[ pos ].next
# 1316|                           = SAFE_TRIE_NODENUM(
# 1317|                                          trie->trans[ stateidx + charid ].next );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def111]
perl-5.42.1/sv_inline.h:603:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sv’
perl-5.42.1/pp_hot.c:4465:1: enter_function: entry to ‘Perl_pp_multideref’
perl-5.42.1/pp_hot.c:4519:18: call_function: calling ‘Perl_vivify_ref’ from ‘Perl_pp_multideref’
#  601|       PERL_ARGS_ASSERT_SVGETMAGIC;
#  602|   
#  603|->     if (UNLIKELY(SvGMAGICAL(sv))) {
#  604|           mg_get(sv);
#  605|       }

Error: CPPCHECK_WARNING (CWE-664): [#def112]
perl-5.42.1/util.c:5357: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5355|   
# 5356|       PERL_ARGS_ASSERT_MY_VSNPRINTF;
# 5357|->     Perl_va_copy(ap, apc);
# 5358|   #    ifdef HAS_VSNPRINTF
# 5359|   

Error: CPPCHECK_WARNING (CWE-664): [#def113]
perl-5.42.1/util.c:5360: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5358|   #    ifdef HAS_VSNPRINTF
# 5359|   
# 5360|->     WITH_LC_NUMERIC_SET_TO_NEEDED(
# 5361|           retval = vsnprintf(buffer, len, format, apc);
# 5362|       );

Error: CPPCHECK_WARNING (CWE-664): [#def114]
perl-5.42.1/util.c:5370: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5368|   #    endif
# 5369|   
# 5370|->     va_end(apc);
# 5371|   #  else
# 5372|   #    ifdef HAS_VSNPRINTF

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-115.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameperl-5.44.0-527.fc45
diffbase-store-results-to/tmp/tmplq6oo2yz/perl-5.44.0-527.fc45.tar.xz
diffbase-time-created2026-08-03 19:14:33
diffbase-time-finished2026-08-03 19:21:22
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmplq6oo2yz/perl-5.44.0-527.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmplq6oo2yz/perl-5.44.0-527.fc45.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-115.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameperl-5.42.1-523.fc44
store-results-to/tmp/tmplrsmewfi/perl-5.42.1-523.fc44.tar.xz
time-created2026-08-03 19:05:39
time-finished2026-08-03 19:14:05
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmplrsmewfi/perl-5.42.1-523.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmplrsmewfi/perl-5.42.1-523.fc44.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9