Branch: refs/heads/cid464357-using-uninitialized
  Home:   https://github.com/Perl/perl5
  Commit: 7b30f3f2954a582523a11f3f816630ed69f78f6a
      
https://github.com/Perl/perl5/commit/7b30f3f2954a582523a11f3f816630ed69f78f6a
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

  Changed paths:
    M locale.c

  Log Message:
  -----------
  stop coverity complaining about copying uninitialised tm_gmtoff, tm_zone

This was reported in the two callers to S_ints_to_tm():

Using uninitialized value mytm.tm_gmtoff when calling S_ints_to_tm.
Using uninitialized value mytm.tm_zone when calling S_ints_to_tm.

cids 464354, 464357


  Commit: cd2ae681d9fd0372615f0a8526c220c8e4487d40
      
https://github.com/Perl/perl5/commit/cd2ae681d9fd0372615f0a8526c220c8e4487d40
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

  Changed paths:
    M regcomp_debug.c

  Log Message:
  -----------
  regdump_intflags: there is no  PL_reg_intflags_name[REG_INTFLAGS_NAME_SIZE]

Yes, this is an old report, from 2014.

cid29034


  Commit: 190839e471602fd8e898ecd95b61782cb8c00fc5
      
https://github.com/Perl/perl5/commit/190839e471602fd8e898ecd95b61782cb8c00fc5
  Author: Tony Cook <t...@develop-help.com>
  Date:   2023-09-19 (Tue, 19 Sep 2023)

  Changed paths:
    M regcomp_debug.c

  Log Message:
  -----------
  regcomp_debug.c: change a mis-use of ASSUME() to STATIC_ASSERT_STMT()

As mauke points out in #21490 the compiler "knows" all of the
constants here at compile-time, so the ASSUME()s here do nothing.

I suspect the intent here was to ensure that we never overflow the
capacity of the flags parameter, which we can check at compile-time
with STATIC_ASSERT_STMT().

mauke also suggested using CHAR_BIT instead of 8, but Configure
probes for CHARBITS and the perl core generally uses CHARBITS,
so use that here too.


Compare: https://github.com/Perl/perl5/compare/7b30f3f2954a%5E...190839e47160

Reply via email to