develooper Front page | perl.perl5.porters | Postings from February 2002

Re: [ID 20020209.009] core dump in Perl_regexec_flags

Thread Previous | Thread Next
From:
Hugo van der Sanden
Date:
February 10, 2002 10:36
Subject:
Re: [ID 20020209.009] core dump in Perl_regexec_flags
Message ID:
200202101838.g1AIcni06219@crypt.compulink.co.uk
Slaven Rezic <eserte@vran.herceg.de> wrote:
:I'm not sure whether this is a Perl/Tk or perl problem:
[...]
:
:In perl's Perl_regexec_flags function, a core will be dumped at line
:1427:
:    bool do_utf8 = DO_UTF8(sv);

That's a problem with the regexp engine.

:The problem is fixed if I change the line to:
:
:    bool do_utf8 = sv && DO_UTF8(sv);

That's fine as a starting point, but I suspect we need the ability to
match on an SV-less UTF8 string as well. Perhaps we should add a flag
for the purpose? Then the above could be:
  bool do_utf8 = sv ? DO_UTF8(sv) : flags & REXEC_UTF8;

Note also that this would require some fixup for the debugging (which
assumes an sv if utf8) and for screaminstr() calls (which assume an sv
if REXEC_SCREAM).

Hugo

Thread Previous | Thread Next


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