in reply to pattern match hangs on malformed UTF-8 input
$ printf "x\0227 " | tmp.pl Compiling REx `^&' size 4 first at 2 1: BOL(2) 2: EXACT <&>(4) 4: END(0) anchored `&' at 0 (checking anchored) anchored(BOL) minlen 1 Compiling REx `\W' size 2 first at 1 1: NALNUM(2) 2: END(0) stclass `NALNUM' minlen 1 Using REx substr: `::' Guessing start of match, REx `\\/^\\/+$' against `/usr/local/lib/perl5/5.6.1//i686-linux/Devel/Peek.pm'... Found floating substr `'$ at offset 52... Does not contradict STCLASS... Guessed: match at offset 0(Snipped up to the part where the regex is actually run because the compilation is exaclty the same, excluding differing memory addresss)
>x— < SV = PV(0x80f4b84) at 0x80f4858 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x811d1e0 "x\227 "\0 CUR = 3 LEN = 80 Guessing start of match, REx `\d ' against `x— '... Found anchored substr ` ' at offset 2... This position contradicts STCLASS... Looking for anchored substr starting at offset 2... Found anchored substr ` ' at offset 2... This position contradicts STCLASS... Looking for anchored substr starting at offset 2... Found anchored substr ` ' at offset 2... This position contradicts STCLASS... Looking for anchored substr starting at offset 2... Found anchored substr ` ' at offset 2... This position contradicts STCLASS... Looking for anchored substr starting at offset 2... Found anchored substr ` ' at offset 2... This position contradicts STCLASS... Looking for anchored substr starting at offset 2... Found anchored substr ` ' at offset 2... This position contradicts STCLASS... Looking for anchored substr starting at offset 2... Found anchored substr ` ' at offset 2... This position contradicts STCLASS... Looking for anchored substr starting at offset 2... Found anchored substr ` ' at offset 2... This position contradicts STCLASS... Looking for anchored substr starting at offset 2... Found anchored substr ` ' at offset 2... This position contradicts STCLASS......etc. this repeats forever
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: pattern match hangs on malformed UTF-8 input
by hv (Prior) on May 09, 2003 at 18:10 UTC |