develooper Front page | perl.perl5.changes | Postings from October 2020

[Perl/perl5] bb5864: Fix GH #17278

Karl Williamson via perl5-changes
October 23, 2020 14:07
[Perl/perl5] bb5864: Fix GH #17278
Message ID:
  Branch: refs/heads/blead
  Commit: bb58640a409949759318542317e353e2241cc408
  Author: Karl Williamson <>
  Date:   2020-10-23 (Fri, 23 Oct 2020)

  Changed paths:
    M regcomp.c
    M t/re/pat_advanced.t

  Log Message:
  Fix GH #17278

This was an assertion failure in regexec.c under rare circumstances.  A
reduction of the fuzzed test case is now in pat_advanced.t

The root cause of this was that the pattern being compiled was encoded in
UTF-8 and 'use locale' was in effect, equivalent to the /l charset, and
then the charset was reset inside the pattern, to /d.  But /d in a UTF-8
patterns is illegal, hence the later assertion failure.

The solution is to reset instead to /u when the pattern is UTF-8. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About