Return-Path: Mailing-List: contact oro-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list oro-dev@jakarta.apache.org Received: (qmail 15826 invoked from network); 22 Dec 2000 23:27:43 -0000 Received: from ms0.nttdata.co.jp (HELO ms.nttdata.co.jp) (163.135.193.231) by locus.apache.org with SMTP; 22 Dec 2000 23:27:43 -0000 Received: from mail1.nttdata.co.jp ([163.135.10.20]) by ms.nttdata.co.jp (8.9.3/3.7W-NTTDATA-TOP-08/31/00) with ESMTP id IAA22085 for ; Sat, 23 Dec 2000 08:27:42 +0900 (JST) Received: from geb.rd.nttdata.co.jp (localhost [127.0.0.1]) by mail1.nttdata.co.jp (8.9.1/3.7W-NTTDmx/00092220) with ESMTP id IAA24289 for ; Sat, 23 Dec 2000 08:27:08 +0900 (JST) Received: from osiris.rd.nttdata.co.jp (osiris.rd.nttdata.co.jp [10.8.144.16]) by geb.rd.nttdata.co.jp (8.9.3/3.7W/R8V8) with ESMTP id IAA11019 for ; Sat, 23 Dec 2000 08:27:41 +0900 (JST) Received: from piccolo (RAS-10-8-157-33.rd.nttdata.co.jp [10.8.157.33]) by osiris.rd.nttdata.co.jp (8.10.1/3.7W/R8V8) with ESMTP id eBMNRet08797 for ; Sat, 23 Dec 2000 08:27:40 +0900 (JST) Message-ID: <000d01c06b7f$d3c07d00$5919fea9@rd.nttdata.co.jp> From: "Takashi Okamoto" To: Subject: Re: infinite loop bug Date: Fri, 22 Dec 2000 03:56:03 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hello ,daniel and jon. >> I have found a bug in ORO 2.0.1 (binary release) that was not in ORO >> 2.0. The code below should loop through getting all XML style tags, >> but instead goes into an infinite loop. If you change the pattern to >> "<[^>]*>" it works fine under either version. I am using JDK 1.2.2 on >> WinNT 4.0 sp5. > From looking at your sample code, it's gotta be caused by the > changes to the handling of PatternMatcherInput between 2.0 and > 2.0.1. I fixed infinite loop bug. Please take this patch. ------------- --- src/java/org/apache/oro/text/regex/Perl5Matcher.java.orig Fri Dec 22 03:23:06 2000 +++ src/java/org/apache/oro/text/regex/Perl5Matcher.java Fri Dec 22 03:24:49 2000 @@ -327,7 +327,7 @@ mustString = expression._mustString = null; __currentOffset = beginOffset; } else { - __currentOffset = beginOffset; + __currentOffset = currentOffset; minLength = mustString.length; } } ----------- Should you use 'currentOffset' instead of 'beginOffset' at other statement which is '__currentOffset = beginOffset'? Regards. ------------------ Takashi Okamoto