Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 897af6bc661bbe5e3361b85654fc529a3e5c70ed
      
https://github.com/Perl/perl5/commit/897af6bc661bbe5e3361b85654fc529a3e5c70ed
  Author: Yves Orton <[email protected]>
  Date:   2022-07-15 (Fri, 15 Jul 2022)

  Changed paths:
    M regen/embed_lib.pl

  Log Message:
  -----------
  regen/embed_lib.pl - deal with comments better

Handle comments on #else like we do with #endif.


  Commit: 6df0bfb668a46ee90e9ad7e8398ac7511b135dbf
      
https://github.com/Perl/perl5/commit/6df0bfb668a46ee90e9ad7e8398ac7511b135dbf
  Author: Yves Orton <[email protected]>
  Date:   2022-07-15 (Fri, 15 Jul 2022)

  Changed paths:
    M embed.fnc
    M embed.h
    M locale.c
    M proto.h

  Log Message:
  -----------
  locale.c - silence build warning for unused S_calculate_LC_ALL()

this function is only use if USE_POSIX_2008_LOCALE is enabled


  Commit: a5023cabc7e50cb727be8ffb125ea068a6492a22
      
https://github.com/Perl/perl5/commit/a5023cabc7e50cb727be8ffb125ea068a6492a22
  Author: Yves Orton <[email protected]>
  Date:   2022-07-15 (Fri, 15 Jul 2022)

  Changed paths:
    M regexec.c

  Log Message:
  -----------
  regexec.c: avoid compiler warnings about possible uninitialized use

There is a codepath where we do not set up folder and fold_array, and
rely on later codepaths not triggering uninitialized access. Because of
the nature of the switch and etc, it is hard for an analyzer or even a
human to be 100% certain it is all set up right in all cases where it
is used.

Also the variable initialization inside of the switch is a bit awkward.
So this patch moves the declarations up, inits the vars to zero and then
asserts before we use any of these vars under DEBUGGING to ensure we
didn't forget.

Example warning:
    re_exec.c:7121:44: warning: ‘fold_array’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
    7121 |                 && UCHARAT(s) != fold_array[nextbyte])

This was noticed when building with:

    ./Configure -d -Doptimize=-g -Dusedevel -DDEBUGGING \
    -Accflags='-fsanitize=address -fsanitize=undefined \
    -ggdb3' -Aldflags='-Wl,--no-as-needed -lasan -lubsan' \
    -Dcc=ccache\ gcc -Dld=gcc


  Commit: 38b12af0e35eec7a8da5bb5a28a3032d24402ef9
      
https://github.com/Perl/perl5/commit/38b12af0e35eec7a8da5bb5a28a3032d24402ef9
  Author: Yves Orton <[email protected]>
  Date:   2022-07-15 (Fri, 15 Jul 2022)

  Changed paths:
    M regcomp.c

  Log Message:
  -----------
  regcomp.c: deal with overflow related OPTIMIZE_INFTY and delta

This includes a detailed comment. The basic issue was the old
code was doing undefined behavior as in some cases delta would
wrap to 0 after the addition. We actually want delta to have a
ceiling of OPTIMIZE_INFTY and not roll over when it reaches it.

This was found with:
    ./Configure -d -Doptimize=-g -Dusedevel -DDEBUGGING \
    -Accflags='-fsanitize=address -fsanitize=undefined \
    -ggdb3' -Aldflags='-Wl,--no-as-needed -lasan -lubsan' \
    -Dcc=ccache\ gcc -Dld=gcc


  Commit: 24a3add986669c1f4ad5040b224428bd097b944e
      
https://github.com/Perl/perl5/commit/24a3add986669c1f4ad5040b224428bd097b944e
  Author: Yves Orton <[email protected]>
  Date:   2022-07-15 (Fri, 15 Jul 2022)

  Changed paths:
    M regcomp.h

  Log Message:
  -----------
  regcomp.h: deal with 64 bit aligned pointer data in regex program.

We cannot safely store 64 bit aligned data in a regnode structure due
to the implicit 32 bit alignment the base structure forces on the
data. Thanks to Tony Cook for the suggestion on how to cleanly support
variable sized pointers without alignment issues.

I am pretty sure we should not be storing pointers in the regexp program
like this. In most cases where we need an SV attached to a regnode
structure we store it in the 'data' array which part of the regexp
structure, and then store an index to that item in the regnode. This
allows the use of a smaller member for the index instead.

This was identified by running "make test_reonly" under the ubsan build:

    ./Configure -d -Doptimize=-g -Dusedevel -DDEBUGGING \
    -Accflags='-fsanitize=address -fsanitize=undefined \
    -ggdb3' -Aldflags='-Wl,--no-as-needed -lasan -lubsan' \
    -Dcc=ccache\ gcc -Dld=gcc


Compare: https://github.com/Perl/perl5/compare/fc8c3ac82b84...24a3add98666

Reply via email to