perl-5.40.2-517.fc43

List of Findings

Error: COMPILER_WARNING (CWE-1164): [#def1]
perl-5.40.2/UU/attrib.c:2:54: warning[-Wunused-function]: ‘I_will_always_be_inlined’ declared ‘static’ but never defined
#    2 | static __inline__ __attribute__((always_inline)) int I_will_always_be_inlined(void);
#      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~

Error: GCC_ANALYZER_WARNING (CWE-688): [#def2]
perl-5.40.2/UU/dirfd.c:26:13: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir(".")’ where non-null expected
perl-5.40.2/UU/dirfd.c:25:21: acquire_memory: this call could return NULL
perl-5.40.2/UU/dirfd.c:26:13: danger: argument 1 (‘opendir(".")’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected

Error: COMPILER_WARNING: [#def3]
perl-5.40.2/UU/signal.c: scope_hint: In function ‘main’
perl-5.40.2/UU/signal.c:158:16: warning[-Wformat=]: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’
#  158 | printf("STKSZ %d\n",SIGSTKSZ);
#      |               ~^
#      |                |
#      |                int
#      |               %ld

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
perl-5.40.2/class.c:720:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘o’
perl-5.40.2/class.c:637:1: enter_function: entry to ‘Perl_class_seal_stash’
perl-5.40.2/class.c:644:8: branch_true: following ‘true’ branch...
perl-5.40.2/class.c:646:13: branch_true: ...to here
perl-5.40.2/class.c:658:32: call_function: calling ‘Perl_newSV_type’ from ‘Perl_class_seal_stash’
perl-5.40.2/class.c:658:32: return_function: returning to ‘Perl_class_seal_stash’ from ‘Perl_newSV_type’
perl-5.40.2/class.c:697:28: branch_true: following ‘true’ branch...
perl-5.40.2/class.c:706:15: branch_true: following ‘true’ branch...
perl-5.40.2/class.c:716:21: branch_false: following ‘false’ branch...
perl-5.40.2/class.c:717:17: branch_false: ...to here
perl-5.40.2/class.c:720:17: release_memory: ‘o’ is NULL
perl-5.40.2/class.c:720:17: danger: dereference of NULL ‘o’
#  718|   
#  719|                   valop = o;
#  720|->                 OpLASTSIB_set(valop, NULL);
#  721|   
#  722|                   ops = op_append_list(OP_LINESEQ, ops, fieldcop);

Error: CPPCHECK_WARNING (CWE-476): [#def5]
perl-5.40.2/class.c:782: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
#  780|                                       sizeof(UNOP_AUX_item) * 2);
#  781|   
#  782|->             aux[0].uv = fieldix;
#  783|   
#  784|               OP *fieldop = newUNOP_AUX(OP_INITFIELD, valop ? OPf_STACKED : 0, valop, aux);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
perl-5.40.2/class.c:782:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.40.2/class.c:637:1: enter_function: entry to ‘Perl_class_seal_stash’
perl-5.40.2/class.c:644:8: branch_true: following ‘true’ branch...
perl-5.40.2/class.c:646:13: branch_true: ...to here
perl-5.40.2/class.c:658:32: call_function: calling ‘Perl_newSV_type’ from ‘Perl_class_seal_stash’
perl-5.40.2/class.c:658:32: return_function: returning to ‘Perl_class_seal_stash’ from ‘Perl_newSV_type’
perl-5.40.2/class.c:697:28: branch_true: following ‘true’ branch...
perl-5.40.2/class.c:706:15: branch_false: following ‘false’ branch (when ‘valop’ is NULL)...
perl-5.40.2/class.c:725:29: branch_false: ...to here
perl-5.40.2/class.c:779:36: acquire_memory: this call could return NULL
perl-5.40.2/class.c:782:13: danger: ‘aux’ could be NULL: unchecked value from [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  780|                                       sizeof(UNOP_AUX_item) * 2);
#  781|   
#  782|->             aux[0].uv = fieldix;
#  783|   
#  784|               OP *fieldop = newUNOP_AUX(OP_INITFIELD, valop ? OPf_STACKED : 0, valop, aux);

Error: CPPCHECK_WARNING (CWE-682): [#def7]
perl-5.40.2/class.c:898: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  896|           UNOP_AUX_item *ap = aux;
#  897|   
#  898|->         (ap++)->uv = av_count(fieldmap) / 2;
#  899|           (ap++)->uv = max_fieldix;
#  900|   

Error: CPPCHECK_WARNING (CWE-476): [#def8]
perl-5.40.2/class.c:898: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ap++
#  896|           UNOP_AUX_item *ap = aux;
#  897|   
#  898|->         (ap++)->uv = av_count(fieldmap) / 2;
#  899|           (ap++)->uv = max_fieldix;
#  900|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
perl-5.40.2/class.c:898:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.40.2/class.c:854:1: enter_function: entry to ‘Perl_class_wrap_method_body’
perl-5.40.2/class.c:858:7: branch_false: following ‘false’ branch (when ‘o’ is non-NULL)...
perl-5.40.2/class.c:868:24: branch_false: ...to here
perl-5.40.2/class.c:870:20: call_function: calling ‘Perl_newSV_type’ from ‘Perl_class_wrap_method_body’
perl-5.40.2/class.c:870:20: return_function: returning to ‘Perl_class_wrap_method_body’ from ‘Perl_newSV_type’
perl-5.40.2/class.c:890:7: branch_true: following ‘true’ branch...
perl-5.40.2/class.c:891:32: branch_true: ...to here
perl-5.40.2/class.c:891:32: acquire_memory: this call could return NULL
perl-5.40.2/class.c:898:9: danger: ‘aux’ could be NULL: unchecked value from [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  896|           UNOP_AUX_item *ap = aux;
#  897|   
#  898|->         (ap++)->uv = av_count(fieldmap) / 2;
#  899|           (ap++)->uv = max_fieldix;
#  900|   

Error: CPPCHECK_WARNING (CWE-682): [#def10]
perl-5.40.2/class.c:1001: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
#  999|   
# 1000|           UNOP_AUX_item *ap = aux;
# 1001|->         (ap++)->uv = 1;       /* fieldcount */
# 1002|           (ap++)->uv = fieldix; /* max_fieldix */
# 1003|   

Error: CPPCHECK_WARNING (CWE-476): [#def11]
perl-5.40.2/class.c:1001: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ap++
#  999|   
# 1000|           UNOP_AUX_item *ap = aux;
# 1001|->         (ap++)->uv = 1;       /* fieldcount */
# 1002|           (ap++)->uv = fieldix; /* max_fieldix */
# 1003|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
perl-5.40.2/class.c:1001:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.40.2/class.c:997:32: acquire_memory: this call could return NULL
perl-5.40.2/class.c:1001:9: danger: ‘aux’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  999|   
# 1000|           UNOP_AUX_item *ap = aux;
# 1001|->         (ap++)->uv = 1;       /* fieldcount */
# 1002|           (ap++)->uv = fieldix; /* max_fieldix */
# 1003|   

Error: CPPCHECK_WARNING (CWE-476): [#def13]
perl-5.40.2/class.c:1015: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1013|               PerlMemShared_malloc(sizeof(*aux));
# 1014|   
# 1015|->         aux->params     = 0;
# 1016|           aux->opt_params = 0;
# 1017|           aux->slurpy     = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
perl-5.40.2/class.c:1015:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.40.2/class.c:1013:13: acquire_memory: this call could return NULL
perl-5.40.2/class.c:1015:9: danger: ‘aux’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1013|               PerlMemShared_malloc(sizeof(*aux));
# 1014|   
# 1015|->         aux->params     = 0;
# 1016|           aux->opt_params = 0;
# 1017|           aux->slurpy     = 0;

Error: CPPCHECK_WARNING (CWE-476): [#def15]
perl-5.40.2/class.c:1016: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1014|   
# 1015|           aux->params     = 0;
# 1016|->         aux->opt_params = 0;
# 1017|           aux->slurpy     = 0;
# 1018|   

Error: CPPCHECK_WARNING (CWE-476): [#def16]
perl-5.40.2/class.c:1017: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1015|           aux->params     = 0;
# 1016|           aux->opt_params = 0;
# 1017|->         aux->slurpy     = 0;
# 1018|   
# 1019|           argcheckop = newUNOP_AUX(OP_ARGCHECK, 0, NULL, (UNOP_AUX_item *)aux);

Error: CPPCHECK_WARNING (CWE-457): [#def17]
perl-5.40.2/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): [#def18]
perl-5.40.2/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): [#def19]
perl-5.40.2/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: GCC_ANALYZER_WARNING (CWE-476): [#def20]
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:64:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘my_sv’
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:56:19: branch_false: following ‘false’ branch...
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:62:9: branch_false: ...to here
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:62:8: branch_true: following ‘true’ branch...
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:63:9: branch_true: ...to here
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:64:50: danger: dereference of NULL ‘my_sv’
#   62|       if (fdebug)
#   63|   	warn("**** In filter_call - maxlen = %d, out len buf = %" IVdf " idx = %d my_sv = %" IVdf " [%s]\n",
#   64|->              maxlen, (IV)SvCUR(buf_sv), idx, (IV)SvCUR(my_sv), SvPVX(my_sv) ) ;
#   65|   
#   66|       while (1) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:70:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘my_sv’
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:56:19: branch_false: following ‘false’ branch...
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:62:9: branch_false: ...to here
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:62:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
perl-5.40.2/cpan/Filter-Util-Call/Call.xs:70:18: danger: dereference of NULL ‘my_sv’
#   68|   	/* anything left from last time */
#   69|   
#   70|->         if ((n = SvCUR(my_sv))) {
#   71|               assert(SvCUR(my_sv) < PERL_INT_MAX) ;
#   72|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1376:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘arg’
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.c:1630:1: enter_function: entry to ‘XS_List__Util_uniq’
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1336:7: branch_false: following ‘false’ branch (when ‘items != 0’)...
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1336:8: branch_false: ...to here
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1343:5: call_function: calling ‘Perl_newSV_type’ from ‘XS_List__Util_uniq’
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1343:5: return_function: returning to ‘XS_List__Util_uniq’ from ‘Perl_newSV_type’
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1345:21: branch_true: following ‘true’ branch (when ‘index < items’)...
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1346:23: branch_true: ...to here
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1367:11: branch_true: following ‘true’ branch (when ‘ix == 0’)...
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1372:16: branch_true: ...to here
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1372:15: branch_true: following ‘true’ branch...
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1372:16: branch_false: following ‘false’ branch...
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1376:17: branch_false: ...to here
perl-5.40.2/cpan/Scalar-List-Utils/ListUtil.xs:1376:17: danger: dereference of NULL ‘arg’
# 1374|               else
# 1375|   #endif
# 1376|->             if(!SvOK(arg) || SvNOK(arg) || SvPOK(arg))
# 1377|               {
# 1378|                   /* Convert undef, NVs and PVs into a well-behaved int */

Error: CPPCHECK_WARNING (CWE-562): [#def23]
perl-5.40.2/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): [#def24]
perl-5.40.2/dist/Time-HiRes/tmp22915.c: scope_hint: In function ‘main’
perl-5.40.2/dist/Time-HiRes/tmp22915.c:7:13: warning[-Wunused-variable]: unused variable ‘tictoc’
#    7 |     clock_t tictoc;
#      |             ^~~~~~

Error: COMPILER_WARNING (CWE-457): [#def25]
perl-5.40.2/dist/Time-HiRes/tmp22915.c:9:12: warning[-Wmaybe-uninitialized]: ‘ts1’ may be used uninitialized
#    9 |     ret1 = futimens(0, ts1);
#      |            ^~~~~~~~~~~~~~~~
perl-5.40.2/perl.h:1785: 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.40.2/dist/Time-HiRes/tmp22915.c:8:21: note: ‘ts1’ declared here
#    8 |     struct timespec ts1[2], ts2[2];
#      |                     ^~~

Error: COMPILER_WARNING (CWE-252): [#def26]
perl-5.40.2/dist/Time-HiRes/tmp22915.c: scope_hint: In function ‘main’
perl-5.40.2/dist/Time-HiRes/tmp22915.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): [#def27]
perl-5.40.2/dist/Time-HiRes/tmp22915.c:12:12: warning[-Wmaybe-uninitialized]: ‘ts1’ may be used uninitialized
#   12 |     ret1 = utimensat(AT_FDCWD, "/dev/stdin", ts1, 0);
#      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
perl-5.40.2/perl.h:1785: 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.40.2/dist/Time-HiRes/tmp22915.c:9:21: note: ‘ts1’ declared here
#    9 |     struct timespec ts1[2], ts2[2];
#      |                     ^~~

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

Error: COMPILER_WARNING (CWE-252): [#def29]
perl-5.40.2/dist/Time-HiRes/tmp22915.c: scope_hint: In function ‘main’
perl-5.40.2/dist/Time-HiRes/tmp22915.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 (CWE-563): [#def30]
perl-5.40.2/dist/Time-HiRes/tmp22915.c:16:17: warning[-Wunused-but-set-variable]: variable ‘st’ set but not used
#   16 |     struct stat st;
#      |                 ^~

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

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

Error: GCC_ANALYZER_WARNING (CWE-688): [#def33]
perl-5.40.2/dist/threads-shared/shared.xs:424:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ul’ where non-null expected
perl-5.40.2/dist/threads-shared/shared.c:2051:1: enter_function: entry to ‘XS_threads__shared_cond_broadcast’
perl-5.40.2/dist/threads-shared/shared.c:2054:8: branch_false: following ‘false’ branch (when ‘items == 1’)...
perl-5.40.2/dist/threads-shared/shared.c:2061:25: branch_false: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1717:12: branch_false: following ‘false’ branch...
perl-5.40.2/dist/threads-shared/shared.xs:1719:9: branch_false: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1723:12: branch_false: following ‘false’ branch...
perl-5.40.2/dist/threads-shared/shared.xs:1725:14: branch_false: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1725:14: call_function: calling ‘S_get_userlock’ from ‘XS_threads__shared_cond_broadcast’
#argument 1 of ‘__builtin_memset’ must be non-null
#  422|           SHARED_CONTEXT;
#  423|           ul = (user_lock *) PerlMemShared_malloc(sizeof(user_lock));
#  424|->         Zero(ul, 1, user_lock);
#  425|           /* Attach to shared SV using ext magic */
#  426|           mg = sv_magicext(ssv, NULL, PERL_MAGIC_ext, &sharedsv_userlock_vtbl,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
perl-5.40.2/dist/threads-shared/shared.xs:1425:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ssv’
perl-5.40.2/dist/threads-shared/shared.c:1625:1: enter_function: entry to ‘XS_threads__shared__tie_STORESIZE’
perl-5.40.2/dist/threads-shared/shared.c:1628:8: branch_false: following ‘false’ branch (when ‘items == 2’)...
perl-5.40.2/dist/threads-shared/shared.c:1631:23: branch_false: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1419:19: branch_false: following ‘false’ branch...
perl-5.40.2/dist/threads-shared/shared.xs:1421:9: branch_false: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1421:9: call_function: calling ‘recursive_lock_acquire’ from ‘XS_threads__shared__tie_STORESIZE’
perl-5.40.2/dist/threads-shared/shared.xs:1421:9: return_function: returning to ‘XS_threads__shared__tie_STORESIZE’ from ‘recursive_lock_acquire’
perl-5.40.2/dist/threads-shared/shared.xs:1421:9: branch_false: following ‘false’ branch (when ‘_eC_ == 0’)...
perl-5.40.2/dist/threads-shared/shared.xs:1421:9: branch_false: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1423:12: branch_true: following ‘true’ branch...
perl-5.40.2/dist/threads-shared/shared.xs:1424:18: branch_true: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1425:22: danger: dereference of NULL ‘ssv’
# 1423|           if (!PL_dirty) {
# 1424|               SV **svp = AvARRAY((AV *)ssv);
# 1425|->             I32 ix = AvFILLp((AV *)ssv);
# 1426|               for (;ix >= count; ix--) {
# 1427|                   SV *sv = svp[ix];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
perl-5.40.2/dist/threads-shared/shared.xs:1452:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sobj’
perl-5.40.2/dist/threads-shared/shared.c:1672:8: branch_false: following ‘false’ branch (when ‘items == 2’)...
perl-5.40.2/dist/threads-shared/shared.c:1675:23: branch_false: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1450:20: branch_false: following ‘false’ branch...
perl-5.40.2/dist/threads-shared/shared.xs:1452:13: branch_false: ...to here
perl-5.40.2/dist/threads-shared/shared.xs:1452:13: danger: dereference of NULL ‘sobj’
# 1450|           SV *sobj = SHAREDSV_FROM_OBJ(obj);
# 1451|           bool exists;
# 1452|->         if (SvTYPE(sobj) == SVt_PVAV) {
# 1453|               SHARED_EDIT;
# 1454|               exists = av_exists((AV*) sobj, SvIV(index));

Error: GCC_ANALYZER_WARNING (CWE-416): [#def36]
perl-5.40.2/dist/threads/threads.xs:1048:17: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘thread’
perl-5.40.2/dist/threads/threads.xs:759:1: enter_function: entry to ‘S_ithread_create’
perl-5.40.2/dist/threads/threads.xs:787:9: branch_false: following ‘false’ branch (when ‘_eC_ == 0’)...
perl-5.40.2/dist/threads/threads.xs:787:9: branch_false: ...to here
perl-5.40.2/dist/threads/threads.xs:788:29: acquire_memory: allocated here
perl-5.40.2/dist/threads/threads.xs:790:5: branch_false: following ‘false’ branch (when ‘_eC_ == 0’)...
perl-5.40.2/dist/threads/threads.xs:790:5: branch_false: ...to here
perl-5.40.2/dist/threads/threads.xs:791:8: branch_false: following ‘false’ branch (when ‘thread’ is non-NULL)...
perl-5.40.2/dist/threads/threads.xs:805:5: branch_false: ...to here
perl-5.40.2/dist/threads/threads.xs:825:5: branch_false: following ‘false’ branch (when ‘_eC_ == 0’)...
perl-5.40.2/dist/threads/threads.xs:826:5: branch_false: ...to here
perl-5.40.2/dist/threads/threads.xs:826:5: branch_false: following ‘false’ branch (when ‘_eC_ == 0’)...
perl-5.40.2/dist/threads/threads.xs:826:5: branch_false: ...to here
perl-5.40.2/dist/threads/threads.xs:903:35: call_function: calling ‘Perl_newSV_type’ from ‘S_ithread_create’
perl-5.40.2/dist/threads/threads.xs:903:35: return_function: returning to ‘S_ithread_create’ from ‘Perl_newSV_type’
perl-5.40.2/dist/threads/threads.xs:959:5: branch_false: following ‘false’ branch (when ‘_eC_ == 0’)...
perl-5.40.2/dist/threads/threads.xs:959:5: branch_false: ...to here
perl-5.40.2/dist/threads/threads.xs:1037:8: branch_true: following ‘true’ branch...
perl-5.40.2/dist/threads/threads.xs:1042:9: branch_true: ...to here
perl-5.40.2/dist/threads/threads.xs:1042:9: branch_false: following ‘false’ branch (when ‘_eC_ == 0’)...
perl-5.40.2/dist/threads/threads.xs:1042:9: branch_false: ...to here
perl-5.40.2/dist/threads/threads.xs:1044:9: call_function: calling ‘S_ithread_free’ from ‘S_ithread_create’
perl-5.40.2/dist/threads/threads.xs:1044:9: return_function: returning to ‘S_ithread_create’ from ‘S_ithread_free’
perl-5.40.2/dist/threads/threads.xs:1046:12: branch_true: following ‘true’ branch...
perl-5.40.2/dist/threads/threads.xs:1047:16: branch_true: ...to here
perl-5.40.2/dist/threads/threads.xs:1047:16: branch_true: following ‘true’ branch (when ‘rc_stack_size != 0’)...
perl-5.40.2/dist/threads/threads.xs:1048:17: branch_true: ...to here
perl-5.40.2/dist/threads/threads.xs:1048:17: danger: use after ‘free’ of ‘thread’; freed at [(46)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/45)
# 1046|           if (ckWARN_d(WARN_THREADS)) {
# 1047|               if (rc_stack_size) {
# 1048|->                 Perl_warn(aTHX_ "Thread creation failed: pthread_attr_setstacksize(%" IVdf ") returned %d", thread->stack_size, rc_stack_size);
# 1049|               } else {
# 1050|                   Perl_warn(aTHX_ "Thread creation failed: pthread_create returned %d", rc_thread_create);

Error: GCC_ANALYZER_WARNING (CWE-835): [#def37]
perl-5.40.2/doio.c:759:28: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.40.2/doio.c:3433:1: enter_function: entry to ‘Perl_start_glob’
#  757|                           Perl_croak(aTHX_ "More than one argument to '%c&' open",IoTYPE(io));
#  758|                       }
#  759|->                     while (isSPACE(*type))
#  760|                           type++;
#  761|                       if (num_svs && (

Error: GCC_ANALYZER_WARNING (CWE-835): [#def38]
perl-5.40.2/doio.c:839:24: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.40.2/doio.c:3433:1: enter_function: entry to ‘Perl_start_glob’
#  837|               } /* & */
#  838|               else {
#  839|->                 while (isSPACE(*type))
#  840|                       type++;
#  841|                   if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def39]
perl-5.40.2/doio.c:1081:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(Perl_PerlIO_fileno(my_perl,  fp), savefd)’
perl-5.40.2/doio.c:499:1: enter_function: entry to ‘Perl_do_openn’
perl-5.40.2/doio.c:508:12: branch_false: following ‘false’ branch (when ‘num_svs == 0’)...
perl-5.40.2/doio.c:512:16: branch_false: ...to here
perl-5.40.2/doio.c:512:16: call_function: calling ‘Perl_do_open_raw’ from ‘Perl_do_openn’
# 1079|                   SETERRNO(EBADF,RMS_IFI);
# 1080|                   goto say_false;
# 1081|->             } else if (PerlLIO_dup2(fd, savefd) < 0) {
# 1082|                   (void)PerlIO_close(fp);
# 1083|                   goto say_false;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def40]
perl-5.40.2/doio.c:1366:12: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.40.2/doio.c:1986:1: enter_function: entry to ‘Perl_do_eof’
# 1364|   S_is_fork_open(const char *name) {
# 1365|       /* return true if name matches /^\A\s*(\|\s+-|\-\s+|)\s*\z/ */
# 1366|->     while (isSPACE(*name))
# 1367|           name++;
# 1368|       if (*name == '|') {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
perl-5.40.2/doio.c:2458:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
perl-5.40.2/doio.c:2428:1: enter_function: entry to ‘Perl_do_aexec5’
perl-5.40.2/doio.c:2440:9: branch_false: following ‘false’ branch...
perl-5.40.2/doio.c:2440:9: branch_false: ...to here
perl-5.40.2/doio.c:2453:12: branch_true: following ‘true’ branch (when ‘really’ is non-NULL)...
perl-5.40.2/doio.c:2454:20: branch_true: ...to here
perl-5.40.2/doio.c:2454:20: call_function: calling ‘Perl_SvPV_helper’ from ‘Perl_do_aexec5’
perl-5.40.2/doio.c:2454:20: return_function: returning to ‘Perl_do_aexec5’ from ‘Perl_SvPV_helper’
perl-5.40.2/doio.c:2454:20: call_function: calling ‘Perl_savepv’ from ‘Perl_do_aexec5’
perl-5.40.2/doio.c:2454:20: return_function: returning to ‘Perl_do_aexec5’ from ‘Perl_savepv’
perl-5.40.2/doio.c:2458:24: danger: dereference of NULL ‘Perl_savepv(my_perl,  Perl_SvPV_helper(my_perl,  really, 0, 2, 2, & Perl_sv_2pv_flags, 0, 32))’
# 2456|           }
# 2457|           if ((!really && argv[0] && *argv[0] != '/') ||
# 2458|->             (really && *tmps != '/'))		/* will execvp use PATH? */
# 2459|               TAINT_ENV();		/* testing IFS here is overkill, probably */
# 2460|           PERL_FPU_PRE_EXEC

Error: GCC_ANALYZER_WARNING (CWE-835): [#def42]
perl-5.40.2/doio.c:2544:12: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.40.2/doio.c:2544:12: danger: infinite loop here
perl-5.40.2/doio.c:2544:12: branch_true: if it ever follows ‘true’ branch, it will always do so...
perl-5.40.2/doio.c:2545:9: branch_true: ...to here
# 2542|   
# 2543|       s = cmd;
# 2544|->     while (isWORDCHAR(*s))
# 2545|           s++;	/* catch VAR=val gizmo */
# 2546|       if (*s == '=')

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
perl-5.40.2/doio.c:2565:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(1, 2)’
perl-5.40.2/doio.c:2546:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
perl-5.40.2/doio.c:2549:19: branch_true: following ‘true’ branch...
perl-5.40.2/doio.c:2550:12: branch_true: ...to here
perl-5.40.2/doio.c:2557:16: branch_true: following ‘true’ branch...
perl-5.40.2/doio.c:2557:17: branch_true: following ‘true’ branch...
perl-5.40.2/doio.c:2565:20: branch_true: following ‘true’ branch...
perl-5.40.2/doio.c:2565:29: branch_true: ...to here
perl-5.40.2/doio.c:2565:29: acquire_resource: opened here
perl-5.40.2/doio.c:2565:21: danger: ‘dup2(1, 2)’ leaks here; was opened at [(11)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/10)
# 2563|                   while (*t && isSPACE(*t))
# 2564|                       ++t;
# 2565|->                 if (!*t && (PerlLIO_dup2(1,2) != -1)) {
# 2566|                       s[-2] = '\0';
# 2567|                       break;

Error: CPPCHECK_WARNING (CWE-476): [#def44]
perl-5.40.2/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: GCC_ANALYZER_WARNING (CWE-476): [#def45]
perl-5.40.2/ext/Devel-Peek/Peek.xs:370:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘first’
perl-5.40.2/ext/Devel-Peek/Peek.xs:369:13: branch_false: following ‘false’ branch...
perl-5.40.2/ext/Devel-Peek/Peek.xs:370:14: branch_false: ...to here
perl-5.40.2/ext/Devel-Peek/Peek.xs:370:14: branch_true: following ‘true’ branch...
perl-5.40.2/ext/Devel-Peek/Peek.xs:370:5: branch_true: ...to here
perl-5.40.2/ext/Devel-Peek/Peek.xs:370:5: danger: dereference of NULL ‘first’
#  368|       }
#  369|       first = OpSIBLING(pm);
#  370|->     second = OpSIBLING(first);
#  371|       if (!second) {
#  372|   	/* It doesn’t really matter what we return here, as this only

Error: GCC_ANALYZER_WARNING (CWE-476): [#def46]
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:323:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:313:1: enter_function: entry to ‘HUF_fix_objects’
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:317:18: call_function: inlined call to ‘Perl_newSV_type_mortal’ from ‘HUF_fix_objects’
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:317:18: call_function: inlined call to ‘Perl_newSV_type_mortal’ from ‘HUF_fix_objects’
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:322:17: branch_true: following ‘true’ branch (when ‘i < len’)...
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:323:23: branch_true: ...to here
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:323:23: call_function: calling ‘Perl_av_fetch_simple’ from ‘HUF_fix_objects’
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:323:23: return_function: returning to ‘HUF_fix_objects’ from ‘Perl_av_fetch_simple’
perl-5.40.2/ext/Hash-Util-FieldHash/FieldHash.xs:323:13: danger: dereference of NULL ‘Perl_av_fetch_simple(my_perl,  Perl_newSV_type(my_perl, 11), (long int)i, 0)’
#  321|       len = av_count(oblist);
#  322|       for (i = 0; i < len; ++i) {
#  323|->         SV* old_id = *av_fetch_simple(oblist, i, 0);
#  324|           SV* trigger = hv_delete_ent(MY_CXT.ob_reg, old_id, 0, 0);
#  325|           SV* obj = SvRV(trigger);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
perl-5.40.2/ext/POSIX/POSIX.c:4008:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘RETVAL’
perl-5.40.2/ext/POSIX/POSIX.c:3972:8: branch_false: following ‘false’ branch (when ‘items == 2’)...
perl-5.40.2/ext/POSIX/POSIX.c:3975:28: branch_false: ...to here
perl-5.40.2/ext/POSIX/POSIX.xs:3052:12: branch_true: following ‘true’ branch...
perl-5.40.2/ext/POSIX/POSIX.xs:3060:22: branch_true: ...to here
perl-5.40.2/ext/POSIX/POSIX.xs:3060:22: acquire_resource: opened here
perl-5.40.2/ext/POSIX/POSIX.c:3999:16: branch_true: following ‘true’ branch (when ‘RETVAL != -1’)...
perl-5.40.2/ext/POSIX/POSIX.c:4000:20: branch_true: ...to here
perl-5.40.2/ext/POSIX/POSIX.c:4000:20: branch_true: following ‘true’ branch (when ‘RETVAL == 0’)...
perl-5.40.2/ext/POSIX/POSIX.c:4001:21: branch_true: ...to here
perl-5.40.2/ext/POSIX/POSIX.c:4008:5: danger: ‘RETVAL’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 4006|   	}
# 4007|       }
# 4008|->     XSRETURN(1);
# 4009|   }
# 4010|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
perl-5.40.2/ext/POSIX/POSIX.c:4834:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘RETVAL’
perl-5.40.2/ext/POSIX/POSIX.c:4802:8: branch_false: following ‘false’ branch (when ‘items == 1’)...
perl-5.40.2/ext/POSIX/POSIX.c:4808:24: branch_false: ...to here
perl-5.40.2/ext/POSIX/POSIX.c:4808:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
perl-5.40.2/ext/POSIX/POSIX.xs:3466:22: branch_false: ...to here
perl-5.40.2/ext/POSIX/POSIX.xs:3466:22: branch_false: following ‘false’ branch...
perl-5.40.2/ext/POSIX/POSIX.xs:3467:41: acquire_resource: opened here
perl-5.40.2/ext/POSIX/POSIX.c:4825:16: branch_true: following ‘true’ branch (when ‘RETVAL != -1’)...
perl-5.40.2/ext/POSIX/POSIX.c:4826:20: branch_true: ...to here
perl-5.40.2/ext/POSIX/POSIX.c:4826:20: branch_true: following ‘true’ branch (when ‘RETVAL == 0’)...
perl-5.40.2/ext/POSIX/POSIX.c:4827:21: branch_true: ...to here
perl-5.40.2/ext/POSIX/POSIX.c:4834:5: danger: ‘RETVAL’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 4832|   	}
# 4833|       }
# 4834|->     XSRETURN(1);
# 4835|   }
# 4836|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def49]
perl-5.40.2/ext/re/re_comp_trie.c:603:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘trie’
perl-5.40.2/ext/re/re_comp_trie.c:549:1: enter_function: entry to ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:556:22: return_function: returning to ‘my_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/ext/re/re_comp_trie.c:586:5: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:602:30: acquire_memory: this call could return NULL
perl-5.40.2/ext/re/re_comp_trie.c:603:5: danger: ‘trie’ could be NULL: unchecked value from [(25)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/24)
#  601|       /* create the trie struct, all zeroed */
#  602|       trie = (reg_trie_data *) PerlMemShared_calloc( 1, sizeof(reg_trie_data) );
#  603|->     trie->refcount = 1;
#  604|       trie->startstate = 1;
#  605|       trie->wordcount = word_count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
perl-5.40.2/ext/re/re_comp_trie.c:1037:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
perl-5.40.2/ext/re/re_comp_trie.c:549:1: enter_function: entry to ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:556:22: return_function: returning to ‘my_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/ext/re/re_comp_trie.c:586:5: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:613:5: call_function: calling ‘Perl_newSV_type’ from ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:613:5: return_function: returning to ‘my_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/ext/re/re_comp_trie.c:618:5: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:619:10: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:877:5: branch_false: following ‘false’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:877:5: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:881:55: call_function: calling ‘Perl_SvIV’ from ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:881:55: return_function: returning to ‘my_make_trie’ from ‘Perl_SvIV’
perl-5.40.2/ext/re/re_comp_trie.c:880:8: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:897:9: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:906:29: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.40.2/ext/re/re_comp_trie.c:993:9: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1006:13: acquire_memory: allocated here
perl-5.40.2/ext/re/re_comp_trie.c:1013:28: branch_true: following ‘true’ branch (when ‘next_alloc > state’)...
perl-5.40.2/ext/re/re_comp_trie.c:1022:21: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1022:20: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1023:25: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1027:36: branch_false: following ‘false’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1035:39: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1035:24: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1036:25: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1037:25: danger: ‘<unknown>’ leaks here; was allocated at [(58)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/57)
# 1035|                       if ( transcount < tp + maxid - minid + 1) {
# 1036|                           transcount *= 2;
# 1037|->                         trie->trans = (reg_trie_trans *)
# 1038|                               PerlMemShared_realloc( trie->trans,
# 1039|                                                        transcount

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
perl-5.40.2/ext/re/re_comp_trie.c:1059:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*trie.trans + (long unsigned int)tp * 8’
perl-5.40.2/ext/re/re_comp_trie.c:549:1: enter_function: entry to ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:556:22: return_function: returning to ‘my_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/ext/re/re_comp_trie.c:586:5: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:613:5: call_function: calling ‘Perl_newSV_type’ from ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:613:5: return_function: returning to ‘my_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/ext/re/re_comp_trie.c:618:5: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:619:10: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:877:5: branch_false: following ‘false’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:877:5: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:881:55: call_function: calling ‘Perl_SvIV’ from ‘my_make_trie’
perl-5.40.2/ext/re/re_comp_trie.c:881:55: return_function: returning to ‘my_make_trie’ from ‘Perl_SvIV’
perl-5.40.2/ext/re/re_comp_trie.c:880:8: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:897:9: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:906:29: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.40.2/ext/re/re_comp_trie.c:993:9: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1006:13: acquire_memory: this call could return NULL
perl-5.40.2/ext/re/re_comp_trie.c:1013:28: branch_true: following ‘true’ branch (when ‘next_alloc > state’)...
perl-5.40.2/ext/re/re_comp_trie.c:1022:21: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1022:20: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1023:25: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1027:36: branch_false: following ‘false’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1035:39: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1035:24: branch_false: following ‘false’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1045:28: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1046:24: branch_true: following ‘true’ branch (when ‘minid == maxid’)...
 branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1048:33: branch_false: following ‘false’ branch (when ‘tp <= zp’)...
perl-5.40.2/ext/re/re_comp_trie.c:1059:54: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1059:29: danger: ‘*trie.trans + (long unsigned int)tp * 8’ could be NULL: unchecked value from [(58)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/57)
# 1057|                           }
# 1058|                           if ( !set ) {
# 1059|->                             trie->trans[ tp ].next = TRIE_LIST_ITEM( state,
# 1060|                                                                      1).newstate;
# 1061|                               trie->trans[ tp ].check = state;

Error: CPPCHECK_WARNING (CWE-476): [#def52]
perl-5.40.2/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: GCC_ANALYZER_WARNING (CWE-476): [#def53]
perl-5.40.2/ext/re/re_comp_trie.c:1662:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘op’
perl-5.40.2/ext/re/re_comp_trie.c:1659:8: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1661:13: branch_true: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1661:13: acquire_memory: this call could return NULL
perl-5.40.2/ext/re/re_comp_trie.c:1662:9: danger: ‘op’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
# 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): [#def54]
perl-5.40.2/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: GCC_ANALYZER_WARNING (CWE-476): [#def55]
perl-5.40.2/ext/re/re_comp_trie.c:1667:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘op’
perl-5.40.2/ext/re/re_comp_trie.c:1659:8: branch_false: following ‘false’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1666:13: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1666:13: acquire_memory: this call could return NULL
perl-5.40.2/ext/re/re_comp_trie.c:1667:9: danger: ‘op’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 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): [#def56]
perl-5.40.2/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): [#def57]
perl-5.40.2/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): [#def58]
perl-5.40.2/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): [#def59]
perl-5.40.2/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: GCC_ANALYZER_WARNING (CWE-476): [#def60]
perl-5.40.2/ext/re/re_comp_trie.c:1684:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc((long unsigned int)numstates, 4)’
perl-5.40.2/ext/re/re_comp_trie.c:1659:8: branch_false: following ‘false’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1666:13: branch_false: ...to here
perl-5.40.2/ext/re/re_comp_trie.c:1677:5: branch_true: following ‘true’ branch...
perl-5.40.2/ext/re/re_comp_trie.c:1679:25: acquire_memory: this call could return NULL
perl-5.40.2/ext/re/re_comp_trie.c:1684:17: danger: ‘calloc((long unsigned int)numstates, 4)’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
# 1682|       /* initialize fail[0..1] to be 1 so that we always have
# 1683|          a valid final fail state */
# 1684|->     fail[ 0 ] = fail[ 1 ] = 1;
# 1685|   
# 1686|       for ( charid = 0; charid < ucharcount ; charid++ ) {

Error: CPPCHECK_WARNING (CWE-562): [#def61]
perl-5.40.2/gv.c:4182: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4180|       ENTER;
# 4181|       SAVEOP();
# 4182|->     PL_op = (OP *) &myop;
# 4183|       if (PERLDB_SUB && PL_curstash != PL_debstash)
# 4184|           PL_op->op_private |= OPpENTERSUB_DB;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def62]
perl-5.40.2/hv.c:3300:40: warning[-Wanalyzer-null-argument]: use of NULL ‘str’ where non-null expected
perl-5.40.2/hv.c:3230:1: enter_function: entry to ‘Perl_unshare_hek’
perl-5.40.2/hv.c:3233:5: call_function: calling ‘S_unshare_hek_or_pvn’ from ‘Perl_unshare_hek’
# 3298|               if (HeKLEN(entry) != len)
# 3299|                   continue;
# 3300|->             if (HeKEY(entry) != str && memNE(HeKEY(entry),str,len))	/* is this it? */
# 3301|                   continue;
# 3302|               if (HeKFLAGS(entry) != flags_masked)

Error: CPPCHECK_WARNING (CWE-476): [#def63]
perl-5.40.2/hv.c:3913: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 3911|   #endif
# 3912|   
# 3913|->     he->refcounted_he_next = parent;
# 3914|   
# 3915|       if (is_pv) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
perl-5.40.2/hv.c:3913:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘he’
perl-5.40.2/hv.c:3841:8: branch_true: following ‘true’ branch (when ‘value’ is NULL)...
perl-5.40.2/hv.c:3863:9: branch_true: ...to here
perl-5.40.2/hv.c:3904:9: acquire_memory: this call could return NULL
perl-5.40.2/hv.c:3913:5: danger: ‘he’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 3911|   #endif
# 3912|   
# 3913|->     he->refcounted_he_next = parent;
# 3914|   
# 3915|       if (is_pv) {

Error: CPPCHECK_WARNING (CWE-476): [#def65]
perl-5.40.2/hv.c:3925: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 3923|   
# 3924|   #ifdef USE_ITHREADS
# 3925|->     he->refcounted_he_hash = hash;
# 3926|       he->refcounted_he_keylen = keylen;
# 3927|       Copy(keypv, he->refcounted_he_data + key_offset, keylen, char);

Error: CPPCHECK_WARNING (CWE-476): [#def66]
perl-5.40.2/hv.c:3926: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: he
# 3924|   #ifdef USE_ITHREADS
# 3925|       he->refcounted_he_hash = hash;
# 3926|->     he->refcounted_he_keylen = keylen;
# 3927|       Copy(keypv, he->refcounted_he_data + key_offset, keylen, char);
# 3928|   #else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def67]
perl-5.40.2/inline.h:61:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘av’
perl-5.40.2/perl.c:5105:1: enter_function: entry to ‘S_incpush’
perl-5.40.2/perl.c:5138:24: branch_false: following ‘false’ branch (when ‘using_sub_dirs == 0’)...
perl-5.40.2/perl.c:5184:12: branch_false: ...to here
perl-5.40.2/perl.c:5184:12: branch_true: following ‘true’ branch (when ‘unshift != 0’)...
perl-5.40.2/perl.c:5188:28: branch_true: ...to here
perl-5.40.2/perl.c:5188: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-476): [#def68]
perl-5.40.2/inline.h:1219:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rx’
perl-5.40.2/pp_hot.c:5205:1: enter_function: entry to ‘Perl_pp_subst’
perl-5.40.2/pp_hot.c:5221:18: branch_false: following ‘false’ branch...
perl-5.40.2/pp_hot.c:5222:20: call_function: inlined call to ‘Perl_ReANY’ from ‘Perl_pp_subst’
# 1217|   Perl_ReANY(const REGEXP * const re)
# 1218|   {
# 1219|->     XPV* const p = (XPV*)SvANY(re);
# 1220|   
# 1221|       PERL_ARGS_ASSERT_REANY;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def69]
perl-5.40.2/locale.c:3398:29: warning[-Wanalyzer-null-argument]: use of NULL ‘current’ where non-null expected
perl-5.40.2/locale.c:3634:1: enter_function: entry to ‘S_new_ctype’
perl-5.40.2/locale.c:3672:9: branch_false: following ‘false’ branch (when the strings are non-equal)...
perl-5.40.2/locale.c:3681:31: branch_false: ...to here
perl-5.40.2/locale.c:3681:31: call_function: calling ‘S_is_locale_utf8’ from ‘S_new_ctype’
#argument 1 of ‘__builtin_strlen’ must be non-null
# 3396|                               " %s",
# 3397|                               name, cat,
# 3398|->                             get_displayable_string(current,
# 3399|                                                      current + strlen(current),
# 3400|                                                      false),

Error: GCC_ANALYZER_WARNING (CWE-688): [#def70]
perl-5.40.2/locale.c:3401:29: warning[-Wanalyzer-null-argument]: use of NULL ‘failed’ where non-null expected
perl-5.40.2/locale.c:3634:1: enter_function: entry to ‘S_new_ctype’
perl-5.40.2/locale.c:3672:9: branch_false: following ‘false’ branch (when the strings are non-equal)...
perl-5.40.2/locale.c:3681:31: branch_false: ...to here
perl-5.40.2/locale.c:3681:31: call_function: calling ‘S_is_locale_utf8’ from ‘S_new_ctype’
#argument 1 of ‘__builtin_strlen’ must be non-null
# 3399|                                                      current + strlen(current),
# 3400|                                                      false),
# 3401|->                             get_displayable_string(failed,
# 3402|                                                      failed + strlen(failed),
# 3403|                                                      false),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def71]
perl-5.40.2/mg.c:2637:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sv’
perl-5.40.2/mg.c:2631:1: enter_function: entry to ‘Perl_defelem_target’
perl-5.40.2/mg.c:2635:8: branch_true: following ‘true’ branch (when ‘mg’ is NULL)...
perl-5.40.2/mg.c:2635:19: branch_true: ...to here
perl-5.40.2/mg.c:2635:19: call_function: calling ‘Perl_mg_find’ from ‘Perl_defelem_target’
perl-5.40.2/mg.c:2635:19: return_function: returning to ‘Perl_defelem_target’ from ‘Perl_mg_find’
perl-5.40.2/mg.c:2637:9: danger: dereference of NULL ‘sv’
# 2635|       if (!mg) mg = mg_find(sv, PERL_MAGIC_defelem);
# 2636|       assert(mg);
# 2637|->     if (LvTARGLEN(sv)) {
# 2638|           if (mg->mg_obj) {
# 2639|               SV * const ahv = LvTARG(sv);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def72]
perl-5.40.2/mg.c:2638:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mg’
perl-5.40.2/mg.c:2631:1: enter_function: entry to ‘Perl_defelem_target’
perl-5.40.2/mg.c:2635:8: branch_true: following ‘true’ branch (when ‘mg’ is NULL)...
perl-5.40.2/mg.c:2635:19: branch_true: ...to here
perl-5.40.2/mg.c:2635:19: call_function: calling ‘Perl_mg_find’ from ‘Perl_defelem_target’
perl-5.40.2/mg.c:2635:19: return_function: returning to ‘Perl_defelem_target’ from ‘Perl_mg_find’
perl-5.40.2/mg.c:2637:8: branch_true: following ‘true’ branch...
perl-5.40.2/mg.c:2638:13: branch_true: ...to here
perl-5.40.2/mg.c:2638:13: danger: dereference of NULL ‘mg’
# 2636|       assert(mg);
# 2637|       if (LvTARGLEN(sv)) {
# 2638|->         if (mg->mg_obj) {
# 2639|               SV * const ahv = LvTARG(sv);
# 2640|               HE * const he = hv_fetch_ent(MUTABLE_HV(ahv), mg->mg_obj, FALSE, 0);

Error: GCC_ANALYZER_WARNING (CWE-835): [#def73]
perl-5.40.2/mg.c:3457:20: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.40.2/mg.c:3004:1: enter_function: entry to ‘Perl_magic_set’
perl-5.40.2/mg.c:3457:20: danger: infinite loop here
perl-5.40.2/mg.c:3457:20: branch_true: if it ever follows ‘true’ branch, it will always do so...
perl-5.40.2/mg.c:3458:17: branch_true: ...to here
# 3455|   #endif
# 3456|   
# 3457|->             while (isSPACE(*p))
# 3458|                   ++p;
# 3459|               if (grok_atoUV(p, &uv, &endptr))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def74]
perl-5.40.2/mg.c:3998:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
perl-5.40.2/mg.c:3985:1: enter_function: entry to ‘Perl_magic_copycallchecker’
perl-5.40.2/mg.c:3996:11: call_function: calling ‘Perl_mg_find’ from ‘Perl_magic_copycallchecker’
perl-5.40.2/mg.c:3996:11: return_function: returning to ‘Perl_magic_copycallchecker’ from ‘Perl_mg_find’
perl-5.40.2/mg.c:3998:9: danger: dereference of NULL ‘Perl_mg_find(nsv, (int)*mg.mg_type)’
# 3996|       nmg = mg_find(nsv, mg->mg_type);
# 3997|       assert(nmg);
# 3998|->     if (nmg->mg_flags & MGf_REFCOUNTED) SvREFCNT_dec(nmg->mg_obj);
# 3999|       nmg->mg_ptr = mg->mg_ptr;
# 4000|       nmg->mg_obj = SvREFCNT_inc_simple(mg->mg_obj);

Error: CPPCHECK_WARNING (CWE-119): [#def75]
perl-5.40.2/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): [#def76]
perl-5.40.2/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): [#def77]
perl-5.40.2/op.c:2917: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(0+(((struct UNOP*)(kid))->op_first)->op_moresib?(((struct UNOP*)(kid))->op_first)->op_sibparent:NULL)
# 2915|               kid = cUNOPo->op_first;
# 2916|               if (kid->op_type == OP_NULL)
# 2917|->                 kid = cUNOPx(OpSIBLING(kUNOP->op_first))
# 2918|                       ->op_first;
# 2919|               o->op_private = OPpLVREF_CV;

Error: CPPCHECK_WARNING (CWE-476): [#def78]
perl-5.40.2/op.c:4959: warning[nullPointer]: Possible null pointer dereference: (struct SVOP*)(0+(((struct LISTOP*)(o))->op_first)->op_moresib?(((struct LISTOP*)(o))->op_first)->op_sibparent:NULL)
# 4957|               goto nope;
# 4958|           {
# 4959|->             SV * const sv = cSVOPx_sv(OpSIBLING(cLISTOPo->op_first));
# 4960|               if (!SvPOK(sv) || SvGMAGICAL(sv)) goto nope;
# 4961|               {

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

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

Error: CPPCHECK_WARNING (CWE-562): [#def81]
perl-5.40.2/op.c:5141: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5139|       PL_warnhook = PERL_WARNHOOK_FATAL;
# 5140|       PL_diehook  = NULL;
# 5141|->     JMPENV_PUSH(ret);
# 5142|   
# 5143|       /* Effective $^W=1.  */

Error: CPPCHECK_WARNING (CWE-476): [#def82]
perl-5.40.2/op.c:7132: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tbl
# 7130|   
# 7131|           tbl = (OPtrans_map*)PerlMemShared_calloc(struct_size, 1);
# 7132|->         tbl->size = 256;
# 7133|           cPVOPo->op_pv = (char*)tbl;
# 7134|   

Error: CPPCHECK_WARNING (CWE-476): [#def83]
perl-5.40.2/op.c:7143: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tbl
# 7141|   
# 7142|               /* Any code points above our limit should be irrelevant */
# 7143|->             if (t_array[i] >= tbl->size) break;
# 7144|   
# 7145|               /* Set up the map */

Error: CPPCHECK_WARNING (CWE-476): [#def84]
perl-5.40.2/op.c:8332: warning[nullPointer]: Possible null pointer dereference: sib
# 8330|           OP * const sib = OpSIBLING(cLOGOPo->op_first);
# 8331|           const I32 t = assignment_type(sib);
# 8332|->         const I32 f = assignment_type(OpSIBLING(sib));
# 8333|   
# 8334|           if (t == ASSIGN_LIST && f == ASSIGN_LIST)

Error: CPPCHECK_WARNING (CWE-476): [#def85]
perl-5.40.2/op.c:12522: warning[nullPointer]: Possible null pointer dereference: catchroot
#12520|       /* First, link up the actual body of the catch block */
#12521|       catchroot = OpSIBLING(cUNOPx(catchkid)->op_first);
#12522|->     catchstart = LINKLIST(catchroot);
#12523|       cLOGOPx(catchkid)->op_other = catchstart;
#12524|   

Error: CPPCHECK_WARNING (CWE-476): [#def86]
perl-5.40.2/op.c:12548: warning[nullPointer]: Possible null pointer dereference: kid
#12546|           o = ck_fun(o);
#12547|           kid = OpSIBLING(cUNOPo->op_first);
#12548|->         if (kid->op_type == OP_RV2GV)
#12549|               op_null(kid);
#12550|       }

Error: CPPCHECK_WARNING (CWE-476): [#def87]
perl-5.40.2/op.c:13094: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(0+(((struct LISTOP*)(o))->op_first)->op_moresib?(((struct LISTOP*)(o))->op_first)->op_sibparent:NULL)
#13092|   
#13093|       if (o->op_flags & OPf_STACKED) {
#13094|->         kid = cUNOPx(OpSIBLING(cLISTOPo->op_first))->op_first;
#13095|           if (kid->op_type != OP_SCOPE && kid->op_type != OP_LEAVE)
#13096|               return no_fh_allowed(o);

Error: CPPCHECK_WARNING (CWE-476): [#def88]
perl-5.40.2/op.c:13108: warning[nullPointer]: Possible null pointer dereference: kid
#13106|           return o;
#13107|       kid = OpSIBLING(cLISTOPo->op_first);
#13108|->     if (kid->op_type != OP_NULL)
#13109|           Perl_croak(aTHX_ "panic: ck_grep, type=%u", (unsigned) kid->op_type);
#13110|       kid = kUNOP->op_first;

Error: CPPCHECK_WARNING (CWE-476): [#def89]
perl-5.40.2/op.c:13118: warning[nullPointer]: Possible null pointer dereference: kid
#13116|   
#13117|       kid = OpSIBLING(cLISTOPo->op_first);
#13118|->     for (kid = OpSIBLING(kid); kid; kid = OpSIBLING(kid))
#13119|           op_lvalue(kid, OP_GREPSTART);
#13120|   

Error: CPPCHECK_WARNING (CWE-476): [#def90]
perl-5.40.2/op.c:13534: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(kidparent)
#13532|           OP * const kidparent =
#13533|               OpSIBLING(cUNOPx(cUNOPx(varop)->op_first)->op_first);
#13534|->         OP * const kid = cUNOPx(kidparent)->op_first;
#13535|           o->op_private |= OPpLVREF_CV;
#13536|           if (kid->op_type == OP_GV) {

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

Error: CPPCHECK_WARNING (CWE-476): [#def92]
perl-5.40.2/op.c:13865: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(kid)
#13863|       PERL_ARGS_ASSERT_SIMPLIFY_SORT;
#13864|   
#13865|->     kid = kUNOP->op_first;				/* get past null */
#13866|       if (!(have_scopeop = kid->op_type == OP_SCOPE)
#13867|        && kid->op_type != OP_LEAVE)

Error: CPPCHECK_WARNING (CWE-476): [#def93]
perl-5.40.2/op.c:14041: warning[nullPointer]: Possible null pointer dereference: kid
#14039|       OP * const kid = OpSIBLING(cUNOPo->op_first);
#14040|       PERL_ARGS_ASSERT_CK_STRINGIFY;
#14041|->     if ((   kid->op_type == OP_JOIN || kid->op_type == OP_QUOTEMETA
#14042|            || kid->op_type == OP_LC   || kid->op_type == OP_LCFIRST
#14043|            || kid->op_type == OP_UC   || kid->op_type == OP_UCFIRST)

Error: CPPCHECK_WARNING (CWE-476): [#def94]
perl-5.40.2/op.c:15255: warning[nullPointer]: Possible null pointer dereference: (struct UNOP*)(0+(((struct UNOP*)(o))->op_first)->op_moresib?(((struct UNOP*)(o))->op_first)->op_sibparent:NULL)
#15253|   
#15254|       assert(OpSIBLING(cUNOPo->op_first)->op_type == OP_NULL);
#15255|->     oleft_pushmark = cUNOPx(OpSIBLING(cUNOPo->op_first))->op_first;
#15256|       assert(oleft_pushmark->op_type == OP_PUSHMARK);
#15257|       oleft = OpSIBLING(oleft_pushmark);

Error: CPPCHECK_WARNING (CWE-401): [#def95]
perl-5.40.2/op.c:15916: error[memleak]: Memory leak: rcpv
#15914|       }
#15915|       rcpv->pv[len-1]= '\0'; /* the last byte should always be null */
#15916|->     return rcpv->pv;
#15917|   }
#15918|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def96]
perl-5.40.2/pad.c:2329:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
perl-5.40.2/pad.c:2310:1: enter_function: entry to ‘Perl_cv_name’
perl-5.40.2/pad.c:2313:9: branch_false: following ‘false’ branch...
perl-5.40.2/pad.c:2318:20: branch_false: ...to here
perl-5.40.2/pad.c:2319:12: branch_true: following ‘true’ branch...
perl-5.40.2/pad.c:2320:17: branch_true: ...to here
perl-5.40.2/pad.c:2320:16: branch_true: following ‘true’ branch...
perl-5.40.2/pad.c:2321:21: branch_true: ...to here
perl-5.40.2/pad.c:2321:20: branch_false: following ‘false’ branch...
perl-5.40.2/pad.c:2329:21: call_function: inlined call to ‘CvNAME_HEK’ from ‘Perl_cv_name’
perl-5.40.2/pad.c:2329:21: branch_false: ...to here
perl-5.40.2/pad.c:2329:21: danger: dereference of NULL ‘<unknown>’
# 2327|                           sv_setpvs(retsv, "__ANON__");
# 2328|                       sv_catpvs(retsv, "::");
# 2329|->                     sv_cathek(retsv, CvNAME_HEK(cv));
# 2330|                   }
# 2331|               }

Error: CPPCHECK_WARNING (CWE-682): [#def97]
perl-5.40.2/peep.c:731: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: 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): [#def98]
perl-5.40.2/peep.c:766: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: 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): [#def99]
perl-5.40.2/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): [#def100]
perl-5.40.2/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): [#def101]
perl-5.40.2/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): [#def102]
perl-5.40.2/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): [#def103]
perl-5.40.2/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): [#def104]
perl-5.40.2/peep.c:1327: warning[nullPointer]: Possible null pointer dereference: kid
# 1325|                   kid = OpSIBLING(cLISTOPo->op_first);
# 1326|               if (/* I bet there's always a pushmark... */
# 1327|->                 OP_TYPE_ISNT_AND_WASNT_NN(kid, OP_LIST)
# 1328|                   && OP_TYPE_ISNT_NN(kid, OP_CONST))
# 1329|               {

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

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

Error: GCC_ANALYZER_WARNING (CWE-476): [#def107]
perl-5.40.2/peep.c:3649:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nullop’
perl-5.40.2/peep.c:2714:8: branch_false: following ‘false’ branch...
perl-5.40.2/peep.c:2723:12: branch_true: following ‘true’ branch (when ‘o’ is non-NULL)...
perl-5.40.2/peep.c:2723:15: branch_true: ...to here
perl-5.40.2/peep.c:2723:13: branch_false: following ‘false’ branch...
perl-5.40.2/peep.c:2725:12: branch_false: ...to here
perl-5.40.2/peep.c:2725:12: branch_false: following ‘false’ branch (when ‘o’ is non-NULL)...
 branch_false: ...to here
perl-5.40.2/peep.c:3646:16: branch_true: following ‘true’ branch...
perl-5.40.2/peep.c:3648:37: branch_true: ...to here
perl-5.40.2/peep.c:3648:37: branch_false: following ‘false’ branch...
perl-5.40.2/peep.c:3649:22: branch_false: ...to here
perl-5.40.2/peep.c:3649:22: danger: dereference of NULL ‘nullop’
# 3647|                   /* first arg is a code block */
# 3648|                   OP * const nullop = OpSIBLING(cLISTOP->op_first);
# 3649|->                 OP * kid          = cUNOPx(nullop)->op_first;
# 3650|   
# 3651|                   assert(nullop->op_type == OP_NULL);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def108]
perl-5.40.2/peep.c:3903:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘left’
perl-5.40.2/peep.c:2714:8: branch_false: following ‘false’ branch...
perl-5.40.2/peep.c:2723:12: branch_true: following ‘true’ branch (when ‘o’ is non-NULL)...
perl-5.40.2/peep.c:2723:15: branch_true: ...to here
perl-5.40.2/peep.c:2723:13: branch_false: following ‘false’ branch...
perl-5.40.2/peep.c:2725:12: branch_false: ...to here
perl-5.40.2/peep.c:2725:12: branch_false: following ‘false’ branch (when ‘o’ is non-NULL)...
 branch_false: ...to here
perl-5.40.2/peep.c:3883:20: branch_true: following ‘true’ branch (when ‘right’ is non-NULL)...
perl-5.40.2/peep.c:3901:32: branch_true: ...to here
perl-5.40.2/peep.c:3901:32: branch_false: following ‘false’ branch...
perl-5.40.2/peep.c:3902:25: branch_false: ...to here
perl-5.40.2/peep.c:3902:24: branch_true: following ‘true’ branch...
perl-5.40.2/peep.c:3903:30: branch_true: ...to here
perl-5.40.2/peep.c:3903:30: danger: dereference of NULL ‘left’
# 3901|                       OP *left = OpSIBLING(right);
# 3902|                       if (left->op_type == OP_SUBSTR
# 3903|->                          && (left->op_private & 7) < 4) {
# 3904|                           op_null(o);
# 3905|                           /* cut out right */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def109]
perl-5.40.2/peep.c:4010:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘oldoldop’
perl-5.40.2/peep.c:2714:8: branch_false: following ‘false’ branch...
perl-5.40.2/peep.c:2723:12: branch_true: following ‘true’ branch (when ‘o’ is non-NULL)...
perl-5.40.2/peep.c:2723:15: branch_true: ...to here
perl-5.40.2/peep.c:2723:13: branch_false: following ‘false’ branch...
perl-5.40.2/peep.c:2725:12: branch_false: ...to here
perl-5.40.2/peep.c:2725:12: branch_false: following ‘false’ branch (when ‘o’ is non-NULL)...
 branch_false: ...to here
perl-5.40.2/peep.c:3980:16: branch_true: following ‘true’ branch...
perl-5.40.2/peep.c:3981:20: branch_true: ...to here
perl-5.40.2/peep.c:3980:17: branch_true: following ‘true’ branch...
perl-5.40.2/peep.c:3980:17: branch_true: following ‘true’ branch...
perl-5.40.2/peep.c:3992:17: branch_true: ...to here
perl-5.40.2/peep.c:4010:17: danger: dereference of NULL ‘oldoldop’
# 4008|                   assert(oldop->op_type == OP_AELEMFAST_LEX);
# 4009|                   /* oldoldop can be arbitrarily deep in the RHS OP tree */
# 4010|->                 oldoldop->op_next = o;
# 4011|   
# 4012|                   /* Even when (rhs != oldoldop), rhs might still have a

Error: CPPCHECK_WARNING (CWE-682): [#def110]
perl-5.40.2/perl.c:1678: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer.
# 1676|           (sizeof(char*) * (n_entries + 1)) + vars_size
# 1677|       );
# 1678|->     char *vars = (char*)(new_environ + n_entries + 1);
# 1679|   
# 1680|       for (size_t i = 0, copied = 0; n_entries > i; ++i) {

Error: CPPCHECK_WARNING (CWE-562): [#def111]
perl-5.40.2/perl.c:1909: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1907|       PL_dowarn = G_WARN_OFF;
# 1908|   
# 1909|->     JMPENV_PUSH(ret);
# 1910|       switch (ret) {
# 1911|       case 0:

Error: CPPCHECK_WARNING (CWE-562): [#def112]
perl-5.40.2/perl.c:2773: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2771|   #endif
# 2772|   
# 2773|->     JMPENV_PUSH(ret);
# 2774|       switch (ret) {
# 2775|       case 1:

Error: CPPCHECK_WARNING (CWE-562): [#def113]
perl-5.40.2/perl.c:3162: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3160|       myop.op_type = OP_ENTERSUB;
# 3161|       SAVEOP();
# 3162|->     PL_op = (OP*)&myop;
# 3163|   
# 3164|       if (!(flags & G_METHOD_NAMED)) {

Error: CPPCHECK_WARNING (CWE-562): [#def114]
perl-5.40.2/perl.c:3186: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3184|           Zero(&method_op, 1, METHOP);
# 3185|           method_op.op_next = (OP*)&myop;
# 3186|->         PL_op = (OP*)&method_op;
# 3187|           if ( flags & G_METHOD_NAMED ) {
# 3188|               method_op.op_ppaddr = PL_ppaddr[OP_METHOD_NAMED];

Error: CPPCHECK_WARNING (CWE-562): [#def115]
perl-5.40.2/perl.c:3211: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3209|           INCMARK;
# 3210|   
# 3211|->         JMPENV_PUSH(ret);
# 3212|   
# 3213|           switch (ret) {

Error: CPPCHECK_WARNING (CWE-562): [#def116]
perl-5.40.2/perl.c:3350: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3348|       TAINT_PROPER("eval_sv()");
# 3349|   
# 3350|->     JMPENV_PUSH(ret);
# 3351|       switch (ret) {
# 3352|       case 0:

Error: GCC_ANALYZER_WARNING (CWE-835): [#def117]
perl-5.40.2/perl.c:3746:19: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.40.2/perl.c:3746:19: danger: infinite loop here
perl-5.40.2/perl.c:3746:19: branch_true: if it ever follows ‘true’ branch, it will always do so...
perl-5.40.2/perl.c:3746:46: branch_true: ...to here
# 3744|   
# 3745|               /* We now allow -d:Module=Foo,Bar and -d:-Module */
# 3746|->             while(isWORDCHAR(*s) || *s==':') ++s;
# 3747|               if (*s != '=')
# 3748|                   sv_catpvn(sv, start, end - start);

Error: GCC_ANALYZER_WARNING (CWE-835): [#def118]
perl-5.40.2/perl.c:3774:19: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.40.2/perl.c:3774:19: danger: infinite loop here
perl-5.40.2/perl.c:3774:19: branch_true: if it ever follows ‘true’ branch, it will always do so...
perl-5.40.2/perl.c:3774:35: branch_true: ...to here
# 3772|               Perl_warner(aTHX_ packWARN(WARN_DEBUGGING),
# 3773|                      "Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?)\n");
# 3774|->         for (s++; isWORDCHAR(*s); s++) ;
# 3775|   #endif
# 3776|           return s;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def119]
perl-5.40.2/perl.c:3813:24: warning[-Wanalyzer-infinite-loop]: infinite loop
perl-5.40.2/perl.c:3813:24: danger: infinite loop here
perl-5.40.2/perl.c:3813:24: branch_true: if it ever follows ‘true’ branch, it will always do so...
perl-5.40.2/perl.c:3814:21: branch_true: ...to here
# 3811|                   for (e = p; *e && !isSPACE(*e); e++) ;
# 3812|                   p = e;
# 3813|->                 while (isSPACE(*p))
# 3814|                       p++;
# 3815|               } while (*p && *p != '-');

Error: GCC_ANALYZER_WARNING (CWE-476): [#def120]
perl-5.40.2/perl.c:5036:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
perl-5.40.2/perl.c:4970:1: enter_function: entry to ‘S_mayberelocate’
perl-5.40.2/perl.c:5003:12: branch_true: following ‘true’ branch (when ‘canrelocate != 0’)...
perl-5.40.2/perl.c:5021:25: branch_true: ...to here
perl-5.40.2/perl.c:5023:16: branch_true: following ‘true’ branch...
perl-5.40.2/perl.c:5025:38: call_function: calling ‘Perl_get_sv’ from ‘S_mayberelocate’
perl-5.40.2/perl.c:5025:38: return_function: returning to ‘S_mayberelocate’ from ‘Perl_get_sv’
perl-5.40.2/perl.c:5036:29: danger: dereference of NULL ‘Perl_get_sv(my_perl, "\030", 0)’
# 5034|                   assert(caret_X);
# 5035|                   assert(SvPOKp(caret_X));
# 5036|->                 prefix_sv = newSVpvn_flags(SvPVX(caret_X), SvCUR(caret_X),
# 5037|                                              SvUTF8(caret_X));
# 5038|                   /* Firstly take off the leading .../

Error: CPPCHECK_WARNING (CWE-562): [#def121]
perl-5.40.2/perl.c:5292: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5290|               SAVEFREESV(cv);
# 5291|           }
# 5292|->         JMPENV_PUSH(ret);
# 5293|           switch (ret) {
# 5294|           case 0:

Error: CPPCHECK_WARNING (CWE-457): [#def122]
perl-5.40.2/perlio.c:2380: warning[uninitvar]: Uninitialized variable: buf
# 2378|       }
# 2379|       *s = '\0';
# 2380|->     return buf;
# 2381|   }
# 2382|   

Error: CPPCHECK_WARNING (CWE-404): [#def123]
perl-5.40.2/perlio.c:3455: error[resourceLeak]: Resource leak: stdio
# 3453|                                   s->stdio);
# 3454|           if (!s->stdio)
# 3455|->             return NULL;
# 3456|           s->stdio = stdio;
# 3457|           fd = fileno(stdio);

Error: CPPCHECK_WARNING (CWE-664): [#def124]
perl-5.40.2/perlio.c:5409: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5407|   #ifdef NEED_VA_COPY
# 5408|       va_list apc;
# 5409|->     Perl_va_copy(ap, apc);
# 5410|       sv = vnewSVpvf(fmt, &apc);
# 5411|       va_end(apc);

Error: CPPCHECK_WARNING (CWE-664): [#def125]
perl-5.40.2/perlio.c:5410: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5408|       va_list apc;
# 5409|       Perl_va_copy(ap, apc);
# 5410|->     sv = vnewSVpvf(fmt, &apc);
# 5411|       va_end(apc);
# 5412|   #else

Error: CPPCHECK_WARNING (CWE-664): [#def126]
perl-5.40.2/perlio.c:5411: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5409|       Perl_va_copy(ap, apc);
# 5410|       sv = vnewSVpvf(fmt, &apc);
# 5411|->     va_end(apc);
# 5412|   #else
# 5413|       sv = vnewSVpvf(fmt, &ap);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def127]
perl-5.40.2/perly.y:993:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aux’
perl-5.40.2/perly.c:300:15: branch_false: following ‘false’ branch...
perl-5.40.2/perly.c:302:5: branch_false: ...to here
perl-5.40.2/perly.c:327:16: branch_false: following ‘false’ branch...
perl-5.40.2/perly.c:347:19: branch_false: ...to here
perl-5.40.2/perly.c:389:20: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
perl-5.40.2/perly.c:431:25: branch_false: ...to here
perl-5.40.2/perly.y:991:37: acquire_memory: this call could return NULL
perl-5.40.2/perly.y:993:29: danger: ‘aux’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  991|                                       PerlMemShared_malloc(
#  992|                                           sizeof(struct op_argcheck_aux));
#  993|->                             aux->params     = parser->sig_elems;
#  994|                               aux->opt_params = parser->sig_optelems;
#  995|                               aux->slurpy     = parser->sig_slurpy;

Error: CPPCHECK_WARNING (CWE-476): [#def128]
perl-5.40.2/perly.y:1279: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1277|   			{ $$ = cmpchain_start($CHRELOP, $lhs, $rhs); }
# 1278|   	|	relopchain[lhs] CHRELOP term[rhs]
# 1279|-> 			{ $$ = cmpchain_extend($CHRELOP, $lhs, $rhs); }
# 1280|   	;
# 1281|   

Error: CPPCHECK_WARNING (CWE-476): [#def129]
perl-5.40.2/perly.y:1280: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1278|   	|	relopchain[lhs] CHRELOP term[rhs]
# 1279|   			{ $$ = cmpchain_extend($CHRELOP, $lhs, $rhs); }
# 1280|-> 	;
# 1281|   
# 1282|   termeqop:	eqopchain %prec PREC_LOW

Error: CPPCHECK_WARNING (CWE-476): [#def130]
perl-5.40.2/perly.y:1281: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: aux
# 1279|   			{ $$ = cmpchain_extend($CHRELOP, $lhs, $rhs); }
# 1280|   	;
# 1281|-> 
# 1282|   termeqop:	eqopchain %prec PREC_LOW
# 1283|   			{ $$ = cmpchain_finish($eqopchain); }

Error: COMPILER_WARNING: [#def131]
perl-5.40.2/pp_ctl.c:92:44: warning: missing terminating ' character
#   92 |     SV **args;
#      |                                            ^
#   90|   {
#   91|       PMOP *pm = cPMOPx(cLOGOP->op_other);
#   92|->     SV **args;
#   93|       int nargs;
#   94|       REGEXP *re = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def132]
perl-5.40.2/pp_ctl.c:6732:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘datasv’
perl-5.40.2/pp_ctl.c:6731:25: branch_false: following ‘false’ branch...
perl-5.40.2/pp_ctl.c:6732:33: branch_false: ...to here
perl-5.40.2/pp_ctl.c:6732:33: danger: dereference of NULL ‘datasv’
# 6730|   {
# 6731|       SV * const datasv = FILTER_DATA(idx);
# 6732|->     const int filter_has_file = IoLINES(datasv);
# 6733|       SV * const filter_state = MUTABLE_SV(IoTOP_GV(datasv));
# 6734|       SV * const filter_sub = MUTABLE_SV(IoBOTTOM_GV(datasv));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def133]
perl-5.40.2/pp_hot.c:1268:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘left’
perl-5.40.2/pp_hot.c:1259:21: branch_true: following ‘true’ branch (when ‘i <= n’)...
perl-5.40.2/pp_hot.c:1266:16: branch_true: ...to here
perl-5.40.2/pp_hot.c:1266:16: branch_true: following ‘true’ branch (when ‘i == n’)...
perl-5.40.2/pp_hot.c:1267:21: branch_true: ...to here
perl-5.40.2/pp_hot.c:1266:21: branch_true: following ‘true’ branch...
perl-5.40.2/pp_hot.c:1268:22: branch_true: ...to here
perl-5.40.2/pp_hot.c:1268:22: danger: dereference of NULL ‘left’
# 1266|               if (    i == n
# 1267|                   && (PL_op->op_private &OPpMULTICONCAT_STRINGIFY)
# 1268|->                 && !(SvPOK(left))
# 1269|                   /* extra conditions for backwards compatibility:
# 1270|                    * probably incorrect, but keep the existing behaviour

Error: CPPCHECK_WARNING (CWE-457): [#def134]
perl-5.40.2/pp_pack.c:1587: warning[uninitvar]: Uninitialized variable: aptr
# 1585|                   SHIFT_VAR(utf8, s, strend, aptr, datumtype, needs_swap);
# 1586|                   /* newSVpv generates undef if aptr is NULL */
# 1587|->                 mPUSHs(newSVpv(aptr, 0));
# 1588|               }
# 1589|               break;

Error: CPPCHECK_WARNING (CWE-457): [#def135]
perl-5.40.2/pp_pack.c:1642: warning[uninitvar]: Uninitialized variable: aptr
# 1640|                   SHIFT_VAR(utf8, s, strend, aptr, datumtype, needs_swap);
# 1641|                   /* newSVpvn generates undef if aptr is NULL */
# 1642|->                 PUSHs(newSVpvn_flags(aptr, len, SVs_TEMP));
# 1643|               }
# 1644|               break;

Error: CPPCHECK_WARNING (CWE-457): [#def136]
perl-5.40.2/pp_pack.c:3117: error[uninitvar]: Uninitialized variable: buffer
# 3115|                   if (from_utf8) {
# 3116|                       char buffer[64];
# 3117|->                     if (!S_utf8_to_bytes(aTHX_ &aptr, aend, buffer, todo,
# 3118|                                         'u' | TYPE_IS_PACK)) {
# 3119|                           *cur = '\0';

Error: GCC_ANALYZER_WARNING (CWE-127): [#def137]
perl-5.40.2/pp_sort.c:469:22: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
perl-5.40.2/pp_sort.c:652:1: enter_function: entry to ‘sortsv_cmp_locale’
perl-5.40.2/pp_sort.c:654:5: call_function: inlined call to ‘S_sortsv_flags_impl’ from ‘sortsv_cmp_locale’
#  467|                   --stackp;
#  468|                   t = list1; list1 = list2; list2 = t;    /* swap lists */
#  469|->             } while ((runs = stackp->runs) == 0);
#  470|           }
#  471|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def138]
perl-5.40.2/pp_sort.c:741:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nullop’
perl-5.40.2/pp_sort.c:711:8: branch_false: following ‘false’ branch...
perl-5.40.2/pp_sort.c:717:5: branch_false: ...to here
perl-5.40.2/pp_sort.c:737:8: branch_true: following ‘true’ branch...
perl-5.40.2/pp_sort.c:738:13: branch_true: ...to here
perl-5.40.2/pp_sort.c:738:12: branch_true: following ‘true’ branch...
perl-5.40.2/pp_sort.c:739:26: branch_true: ...to here
perl-5.40.2/pp_sort.c:739:26: branch_false: following ‘false’ branch...
perl-5.40.2/pp_sort.c:741:26: branch_false: ...to here
perl-5.40.2/pp_sort.c:741:26: danger: dereference of NULL ‘nullop’
#  739|               OP *nullop = OpSIBLING(cLISTOP->op_first);  /* pass pushmark */
#  740|               assert(nullop->op_type == OP_NULL);
#  741|->             PL_sortcop = nullop->op_next;
#  742|           }
#  743|           else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def139]
perl-5.40.2/pp_sort.c:775:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cv’
perl-5.40.2/pp_sort.c:711:8: branch_false: following ‘false’ branch...
perl-5.40.2/pp_sort.c:717:5: branch_false: ...to here
perl-5.40.2/pp_sort.c:737:8: branch_true: following ‘true’ branch...
perl-5.40.2/pp_sort.c:738:13: branch_true: ...to here
perl-5.40.2/pp_sort.c:738:12: branch_false: following ‘false’ branch...
perl-5.40.2/pp_sort.c:747:17: branch_false: ...to here
perl-5.40.2/pp_sort.c:778:24: branch_true: following ‘true’ branch (when ‘autogv’ is NULL)...
perl-5.40.2/pp_sort.c:779:34: branch_true: ...to here
perl-5.40.2/pp_sort.c:778:25: branch_true: following ‘true’ branch...
perl-5.40.2/pp_sort.c:784:30: branch_true: ...to here
perl-5.40.2/pp_sort.c:784:30: branch_false: following ‘false’ branch...
perl-5.40.2/pp_sort.c:785:25: branch_false: ...to here
perl-5.40.2/pp_sort.c:762:16: branch_false: following ‘false’ branch (when ‘cv’ is NULL)...
perl-5.40.2/pp_sort.c:772:21: branch_false: ...to here
perl-5.40.2/pp_sort.c:772:20: branch_false: following ‘false’ branch...
perl-5.40.2/pp_sort.c:775:27: branch_false: ...to here
perl-5.40.2/pp_sort.c:775:27: danger: dereference of NULL ‘cv’
#  773|                       goto autoload;
#  774|                   }
#  775|->                 else if (!CvANON(cv) && (gv = CvGV(cv))) {
#  776|                       if (cv != GvCV(gv)) cv = GvCV(gv);
#  777|                     autoload:

Error: GCC_ANALYZER_WARNING (CWE-775): [#def140]
perl-5.40.2/pp_sys.c:2829:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘Perl_PerlIO_fileno(my_perl, *io.sv_u.svu_fp)’
perl-5.40.2/pp_sys.c:2826:8: branch_false: following ‘false’ branch...
perl-5.40.2/pp_sys.c:2829:9: branch_false: ...to here
perl-5.40.2/pp_sys.c:2829:8: danger: ‘Perl_PerlIO_fileno(my_perl, *io.sv_u.svu_fp)’ leaks here
# 2827|           goto nuts;
# 2828|   
# 2829|->     if (PerlSock_listen(PerlIO_fileno(IoIFP(io)), backlog) >= 0)
# 2830|           RETPUSHYES;
# 2831|       else

Error: COMPILER_WARNING (CWE-1164): [#def141]
perl-5.40.2/perl.h:6186: included_from: Included from here.
perl-5.40.2/_cflags.c:2: included_from: Included from here.
perl-5.40.2/proto.h:626:1: warning[-Wunused-function]: ‘Perl_croak_memory_wrap’ declared ‘static’ but never defined
#  626 | Perl_croak_memory_wrap(void)
#      | ^~~~~~~~~~~~~~~~~~~~~~
#  624|   
#  625|   PERL_STATIC_NO_RET void
#  626|-> Perl_croak_memory_wrap(void)
#  627|           __attribute__noreturn__;
#  628|   #define PERL_ARGS_ASSERT_CROAK_MEMORY_WRAP

Error: GCC_ANALYZER_WARNING (CWE-688): [#def142]
perl-5.40.2/regcomp_invlist.c:1531:15: warning[-Wanalyzer-null-argument]: use of NULL ‘array_a’ where non-null expected
perl-5.40.2/regcomp_invlist.c:1473:1: enter_function: entry to ‘Perl__invlistEQ’
perl-5.40.2/regcomp_invlist.c:1479:22: call_function: inlined call to ‘S__invlist_len’ from ‘Perl__invlistEQ’
perl-5.40.2/regcomp_invlist.c:1480:16: call_function: inlined call to ‘S__invlist_len’ from ‘Perl__invlistEQ’
perl-5.40.2/regcomp_invlist.c:1490:8: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_invlist.c:1491:12: branch_true: ...to here
perl-5.40.2/regcomp_invlist.c:1491:12: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_invlist.c:1500:19: call_function: inlined call to ‘S_invlist_array’ from ‘Perl__invlistEQ’
perl-5.40.2/regcomp_invlist.c:1509:12: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_invlist.c:1512:13: branch_false: ...to here
perl-5.40.2/regcomp_invlist.c:1530:15: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_invlist.c:1531:15: branch_true: ...to here
perl-5.40.2/regcomp_invlist.c:1531:15: danger: argument 1 (‘array_a’) NULL where non-null expected
# 1529|   
# 1530|       return    len_a == len_b
# 1531|->            && memEQ(array_a, array_b, len_a * sizeof(array_a[0]));
# 1532|   
# 1533|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def143]
perl-5.40.2/regcomp_trie.c:603:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘trie’
perl-5.40.2/regcomp_trie.c:549:1: enter_function: entry to ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:556:22: return_function: returning to ‘Perl_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/regcomp_trie.c:602:30: acquire_memory: this call could return NULL
perl-5.40.2/regcomp_trie.c:603:5: danger: ‘trie’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
#  601|       /* create the trie struct, all zeroed */
#  602|       trie = (reg_trie_data *) PerlMemShared_calloc( 1, sizeof(reg_trie_data) );
#  603|->     trie->refcount = 1;
#  604|       trie->startstate = 1;
#  605|       trie->wordcount = word_count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
perl-5.40.2/regcomp_trie.c:1037:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
perl-5.40.2/regcomp_trie.c:549:1: enter_function: entry to ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:556:22: return_function: returning to ‘Perl_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/regcomp_trie.c:662:25: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.40.2/regcomp_trie.c:839:26: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:877:5: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_trie.c:877:5: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:880:8: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_trie.c:901:13: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:906:29: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.40.2/regcomp_trie.c:993:9: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1006:13: acquire_memory: allocated here
perl-5.40.2/regcomp_trie.c:1013:28: branch_true: following ‘true’ branch (when ‘next_alloc > state’)...
perl-5.40.2/regcomp_trie.c:1022:21: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:1022:20: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_trie.c:1023:25: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:1027:36: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_trie.c:1035:39: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1035:24: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_trie.c:1036:25: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:1037:25: danger: ‘<unknown>’ leaks here; was allocated at [(18)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/17)
# 1035|                       if ( transcount < tp + maxid - minid + 1) {
# 1036|                           transcount *= 2;
# 1037|->                         trie->trans = (reg_trie_trans *)
# 1038|                               PerlMemShared_realloc( trie->trans,
# 1039|                                                        transcount

Error: GCC_ANALYZER_WARNING (CWE-476): [#def145]
perl-5.40.2/regcomp_trie.c:1059:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*trie.trans + (long unsigned int)tp * 8’
perl-5.40.2/regcomp_trie.c:549:1: enter_function: entry to ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:556:22: return_function: returning to ‘Perl_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/regcomp_trie.c:662:25: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.40.2/regcomp_trie.c:839:26: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:877:5: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_trie.c:877:5: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:880:8: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_trie.c:901:13: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:906:29: branch_false: following ‘false’ branch (when ‘cur >= last’)...
perl-5.40.2/regcomp_trie.c:993:9: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1006:13: acquire_memory: this call could return NULL
perl-5.40.2/regcomp_trie.c:1013:28: branch_true: following ‘true’ branch (when ‘next_alloc > state’)...
perl-5.40.2/regcomp_trie.c:1022:21: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:1022:20: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_trie.c:1023:25: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:1027:36: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_trie.c:1035:39: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1035:24: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_trie.c:1045:28: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1046:24: branch_true: following ‘true’ branch (when ‘minid == maxid’)...
 branch_true: ...to here
perl-5.40.2/regcomp_trie.c:1048:33: branch_false: following ‘false’ branch (when ‘tp <= zp’)...
perl-5.40.2/regcomp_trie.c:1059:54: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1059:29: danger: ‘*trie.trans + (long unsigned int)tp * 8’ could be NULL: unchecked value from [(18)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/17)
# 1057|                           }
# 1058|                           if ( !set ) {
# 1059|->                             trie->trans[ tp ].next = TRIE_LIST_ITEM( state,
# 1060|                                                                      1).newstate;
# 1061|                               trie->trans[ tp ].check = state;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def146]
perl-5.40.2/regcomp_trie.c:1662:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘op’
perl-5.40.2/regcomp_trie.c:1659:8: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_trie.c:1661:13: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:1661:13: acquire_memory: this call could return NULL
perl-5.40.2/regcomp_trie.c:1662:9: danger: ‘op’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 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: GCC_ANALYZER_WARNING (CWE-476): [#def147]
perl-5.40.2/regcomp_trie.c:1667:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘op’
perl-5.40.2/regcomp_trie.c:1659:8: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_trie.c:1666:13: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1666:13: acquire_memory: this call could return NULL
perl-5.40.2/regcomp_trie.c:1667:9: danger: ‘op’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
# 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: GCC_ANALYZER_WARNING (CWE-476): [#def148]
perl-5.40.2/regcomp_trie.c:1675:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘aho’
perl-5.40.2/regcomp_trie.c:1659:8: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_trie.c:1666:13: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1673:27: acquire_memory: this call could return NULL
perl-5.40.2/regcomp_trie.c:1675:5: danger: ‘aho’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 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: GCC_ANALYZER_WARNING (CWE-476): [#def149]
perl-5.40.2/regcomp_trie.c:1684:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc((long unsigned int)numstates, 4)’
perl-5.40.2/regcomp_trie.c:1659:8: branch_false: following ‘false’ branch...
perl-5.40.2/regcomp_trie.c:1666:13: branch_false: ...to here
perl-5.40.2/regcomp_trie.c:1679:25: acquire_memory: this call could return NULL
perl-5.40.2/regcomp_trie.c:1684:17: danger: ‘calloc((long unsigned int)numstates, 4)’ could be NULL: unchecked value from [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 1682|       /* initialize fail[0..1] to be 1 so that we always have
# 1683|          a valid final fail state */
# 1684|->     fail[ 0 ] = fail[ 1 ] = 1;
# 1685|   
# 1686|       for ( charid = 0; charid < ucharcount ; charid++ ) {

Error: COMPILER_WARNING: [#def150]
perl-5.40.2/regexec.c:210:253: warning: missing terminating " character
#  210 |             rn = (FLAGS(rn) == 0) ? REGNODE_AFTER_type(rn,tregnode_IFMATCH) : rn + ARG1u(rn); \
#      |                                                                                                                                                                                                                                                             ^
#  208|               rn = REGNODE_AFTER_type(rn,tregnode_PLUS); \
#  209|           else if (type == IFMATCH) \
#  210|->             rn = (FLAGS(rn) == 0) ? REGNODE_AFTER_type(rn,tregnode_IFMATCH) : rn + ARG1u(rn); \
#  211|           else rn += NEXT_OFF(rn); \
#  212|       } \

Error: GCC_ANALYZER_WARNING (CWE-476): [#def151]
perl-5.40.2/reginline.h:42:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
perl-5.40.2/regcomp_trie.c:549:1: enter_function: entry to ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:556:22: call_function: calling ‘Perl_newSV_type’ from ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:556:22: return_function: returning to ‘Perl_make_trie’ from ‘Perl_newSV_type’
perl-5.40.2/regcomp_trie.c:619:8: branch_true: following ‘true’ branch...
perl-5.40.2/regcomp_trie.c:620:9: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:662:25: branch_true: following ‘true’ branch (when ‘cur < last’)...
perl-5.40.2/regcomp_trie.c:663:26: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:663:26: call_function: calling ‘Perl_regnode_after’ from ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:663:26: return_function: returning to ‘Perl_make_trie’ from ‘Perl_regnode_after’
perl-5.40.2/regcomp_trie.c:662:44: call_function: calling ‘Perl_regnext’ from ‘Perl_make_trie’
perl-5.40.2/regcomp_trie.c:662:44: return_function: returning to ‘Perl_make_trie’ from ‘Perl_regnext’
perl-5.40.2/regcomp_trie.c:662:25: branch_true: following ‘true’ branch (when ‘cur < last’)...
perl-5.40.2/regcomp_trie.c:663:26: branch_true: ...to here
perl-5.40.2/regcomp_trie.c:663:26: call_function: calling ‘Perl_regnode_after’ from ‘Perl_make_trie’
#   40|       const regnode *ret = p + NODE_STEP_REGNODE + REGNODE_ARG_LEN(op);
#   41|       if (varies || REGNODE_ARG_LEN_VARIES(op))
#   42|->         ret += STR_SZ(STR_LEN(p));
#   43|       return (regnode *)ret;
#   44|   }

Error: CPPCHECK_WARNING (CWE-476): [#def152]
perl-5.40.2/sv.c:15659: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: my_perl
#15657|       /* for each stash, determine whether its objects should be cloned */
#15658|       S_visit(proto_perl, do_mark_cloneable_stash, SVt_PVHV, SVTYPEMASK);
#15659|->     my_perl->Iphase = PERL_PHASE_CONSTRUCT;
#15660|       PERL_SET_THX(my_perl);
#15661|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def153]
perl-5.40.2/sv_inline.h:614:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sv’
perl-5.40.2/pp_hot.c:4459:1: enter_function: entry to ‘Perl_pp_multideref’
perl-5.40.2/pp_hot.c:4513:18: call_function: calling ‘Perl_vivify_ref’ from ‘Perl_pp_multideref’
#  612|       PERL_ARGS_ASSERT_SVGETMAGIC;
#  613|   
#  614|->     if (UNLIKELY(SvGMAGICAL(sv))) {
#  615|           mg_get(sv);
#  616|       }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def154]
perl-5.40.2/sv_inline.h:936:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sv’
perl-5.40.2/pp_sys.c:3703:1: enter_function: entry to ‘Perl_pp_fttext’
perl-5.40.2/pp_sys.c:3728:8: branch_false: following ‘false’ branch (when ‘gv’ is NULL)...
perl-5.40.2/pp_sys.c:3791:16: branch_false: ...to here
perl-5.40.2/pp_sys.c:3791:16: call_function: calling ‘Perl_SvPV_helper’ from ‘Perl_pp_fttext’
#  934|           || (type == SvPVforce_type_     && SvPOK_pure_nogthink(sv))
#  935|           || (type == SvPVutf8_type_      && SvPOK_utf8_nog(sv))
#  936|->         || (type == SvPVnormal_type_    && SvPOK_nog(sv))
#  937|           || (type == SvPVutf8_pure_type_ && SvPOK_utf8_pure_nogthink(sv))
#  938|           || (type == SvPVbyte_pure_type_ && SvPOK_byte_pure_nogthink(sv))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def155]
perl-5.40.2/universal.c:76:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘canon_name’
perl-5.40.2/universal.c:61:8: branch_false: following ‘false’ branch...
perl-5.40.2/universal.c:70:17: branch_false: ...to here
perl-5.40.2/universal.c:72:8: branch_true: following ‘true’ branch...
perl-5.40.2/universal.c:73:27: branch_true: ...to here
perl-5.40.2/universal.c:74:39: branch_false: following ‘false’ branch...
perl-5.40.2/universal.c:76:13: branch_false: ...to here
perl-5.40.2/universal.c:76:13: danger: dereference of NULL ‘canon_name’
#   74|           if (!canon_name) canon_name = HvNAME_HEK(our_stash);
#   75|           assert(canon_name);
#   76|->         if (hv_common(isa, NULL, HEK_KEY(canon_name), HEK_LEN(canon_name),
#   77|                         HEK_FLAGS(canon_name),
#   78|                         HV_FETCH_ISEXISTS, NULL, HEK_HASH(canon_name))) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def156]
perl-5.40.2/universal.c:105:17: warning[-Wanalyzer-null-argument]: use of NULL ‘name’ where non-null expected
perl-5.40.2/universal.c:146:1: enter_function: entry to ‘Perl_sv_derived_from_sv’
perl-5.40.2/universal.c:149:12: call_function: calling ‘S_sv_derived_from_svpvn’ from ‘Perl_sv_derived_from_sv’
#  103|               if (namesv)
#  104|                   name = SvPV_nolen(namesv);
#  105|->             if (strEQ(name, type))
#  106|                   return TRUE;
#  107|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def157]
perl-5.40.2/util.c:1391:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘Perl_safesysmalloc(24)’
perl-5.40.2/util.c:1377:1: enter_function: entry to ‘S_mess_alloc’
perl-5.40.2/util.c:1389:5: call_function: calling ‘Perl_safesysmalloc’ from ‘S_mess_alloc’
perl-5.40.2/util.c:1389:5: return_function: returning to ‘S_mess_alloc’ from ‘Perl_safesysmalloc’
perl-5.40.2/util.c:1390:5: call_function: calling ‘Perl_safesyscalloc’ from ‘S_mess_alloc’
perl-5.40.2/util.c:1390:5: return_function: returning to ‘S_mess_alloc’ from ‘Perl_safesyscalloc’
perl-5.40.2/util.c:1391:5: danger: dereference of NULL ‘Perl_safesysmalloc(24)’
# 1389|       Newx(sv, 1, SV);
# 1390|       Newxz(any, 1, XPVMG);
# 1391|->     SvFLAGS(sv) = SVt_PVMG;
# 1392|       SvANY(sv) = (void*)any;
# 1393|       SvPV_set(sv, NULL);

Error: CPPCHECK_WARNING (CWE-664): [#def158]
perl-5.40.2/util.c:5369: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5367|   
# 5368|       PERL_ARGS_ASSERT_MY_VSNPRINTF;
# 5369|->     Perl_va_copy(ap, apc);
# 5370|   #    ifdef HAS_VSNPRINTF
# 5371|   

Error: CPPCHECK_WARNING (CWE-664): [#def159]
perl-5.40.2/util.c:5372: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5370|   #    ifdef HAS_VSNPRINTF
# 5371|   
# 5372|->     WITH_LC_NUMERIC_SET_TO_NEEDED(
# 5373|           retval = vsnprintf(buffer, len, format, apc);
# 5374|       );

Error: CPPCHECK_WARNING (CWE-664): [#def160]
perl-5.40.2/util.c:5382: error[va_list_usedBeforeStarted]: va_list 'apc' used before va_start() was called.
# 5380|   #    endif
# 5381|   
# 5382|->     va_end(apc);
# 5383|   #  else
# 5384|   #    ifdef HAS_VSNPRINTF

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-211.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameperl-5.40.2-517.fc43
store-results-to/tmp/tmpuxwm2yap/perl-5.40.2-517.fc43.tar.xz
time-created2025-04-25 15:02:58
time-finished2025-04-25 15:11:50
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpuxwm2yap/perl-5.40.2-517.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpuxwm2yap/perl-5.40.2-517.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9