develooper Front page | perl.perl5.changes | Postings from May 2021

[Perl/perl5] b2b856: [gh 17847] Include data->pos_delta in #if'd-outdi...

From:
Hugo van der Sanden via perl5-changes
Date:
May 4, 2021 16:07
Subject:
[Perl/perl5] b2b856: [gh 17847] Include data->pos_delta in #if'd-outdi...
Message ID:
Perl/perl5/push/refs/heads/gh17847/1b08fe-c14c11@github.com
  Branch: refs/heads/gh17847
  Home:   https://github.com/Perl/perl5
  Commit: b2b85681b42f13c8a70b583166364cd7f86df65b
      https://github.com/Perl/perl5/commit/b2b85681b42f13c8a70b583166364cd7f86df65b
  Author: Hugo van der Sanden <hv@crypt.org>
  Date:   2021-05-04 (Tue, 04 May 2021)

  Changed paths:
    M regcomp.c

  Log Message:
  -----------
  [gh 17847] Include data->pos_delta in #if'd-out diagnostic


  Commit: 0a065f31b54c06779b680b01adaf1346bc012e77
      https://github.com/Perl/perl5/commit/0a065f31b54c06779b680b01adaf1346bc012e77
  Author: Hugo van der Sanden <hv@crypt.org>
  Date:   2021-05-04 (Tue, 04 May 2021)

  Changed paths:
    M regcomp.c

  Log Message:
  -----------
  [gh 17847] avoid overflow on delta in study_chunk

delta and pos_delta may hold OPTIMIZE_INFTY to represent infinity.


  Commit: c14c117a739a744dbf5ed6f0c5dc4d0ede1f876c
      https://github.com/Perl/perl5/commit/c14c117a739a744dbf5ed6f0c5dc4d0ede1f876c
  Author: Hugo van der Sanden <hv@crypt.org>
  Date:   2021-05-04 (Tue, 04 May 2021)

  Changed paths:
    M regcomp.c

  Log Message:
  -----------
  [gh 17847] data->pos_delta should stick at infinity

The expression we're about to add to data->pos_delta in this part of
study_chunk() can be both positive or negative; however while we apply
an overflow check to avoid exceeding OPTIMIZE_INFTY, we were happily
subtracting from it when the expression was negative, making it no longer
infinite.


Compare: https://github.com/Perl/perl5/compare/1b08fea2be93...c14c117a739a



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About