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

Re: [ID 20020209.009] core dump in Perl_regexec_flags

Thread Previous
Nick Ing-Simmons
February 10, 2002 11:56
Re: [ID 20020209.009] core dump in Perl_regexec_flags
Message ID:
Hugo Van Der Sanden <> writes:
>Slaven Rezic <> 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
>:    bool do_utf8 = DO_UTF8(sv);
>That's a problem with the regexp engine.

And Tk ;-)

>:The problem is fixed if I change the line to:
>:    bool do_utf8 = sv && DO_UTF8(sv);
>That's fine as a starting point, 

There are other references to sv further down - some guarded, some not
(in my quick scan).

>but I suspect we need the ability to
>match on an SV-less UTF8 string as well. 

I have no real problem requiring an SV for this.
I just patched Tk to construct one.
What mislead me was that SV * parameter used to be called 'screamer' 
and was something to do with 'study'. I never understood that and did 
not known that SV * _was_ the string. 

When Unicode-aware Tk gets out it will only ever use this on UTF-8 strings.

>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
Nick Ing-Simmons

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About