public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/26177]  New: Exception when compiling valid regex pattern
@ 2006-02-08 17:03 green at redhat dot com
  2006-02-08 17:11 ` [Bug libgcj/26177] " konqueror at gmx dot de
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: green at redhat dot com @ 2006-02-08 17:03 UTC (permalink / raw)
  To: java-prs

The azureus developers identified a regex failure that is causing trouble...

$ cat /tmp/ar.java
import java.util.regex.*;

public class ar
{
  public static void main (String args[])
  {
    Pattern p = Pattern.compile ("(?i)yoda");
  }
}
$ gcj -C ar.java
$ gij ar
Exception in thread "main" java.util.regex.PatternSyntaxException: At position
1 in regular expression pattern:
quantifier (?*+{}) without preceding token
        (?i)yoda
         ^
   at java.util.regex.Pattern.Pattern(java.lang.String, int)
(/usr/lib/libgcj.so.6.0.0)
   at java.util.regex.Pattern.compile(java.lang.String, int)
(/usr/lib/libgcj.so.6.0.0)
   at java.util.regex.Pattern.compile(java.lang.String)
(/usr/lib/libgcj.so.6.0.0)
   at ar.main(java.lang.String[]) (Unknown Source)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)

(Yes, I ran this again 4.0, but the same thing happens in 4.1).


-- 
           Summary: Exception when compiling valid regex pattern
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: green at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
@ 2006-02-08 17:11 ` konqueror at gmx dot de
  2006-02-08 17:22 ` [Bug classpath/26177] " mark at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: konqueror at gmx dot de @ 2006-02-08 17:11 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from konqueror at gmx dot de  2006-02-08 17:11 -------
Subject: Re:   New: Exception when compiling valid regex pattern

On Wed, Feb 08, 2006 at 05:03:48PM -0000, green at redhat dot com wrote:
> The azureus developers identified a regex failure that is causing trouble...
> 
> $ cat /tmp/ar.java
> import java.util.regex.*;
> 
> public class ar
> {
>   public static void main (String args[])
>   {
>     Pattern p = Pattern.compile ("(?i)yoda");
>   }
> }
> $ gcj -C ar.java
> $ gij ar
> Exception in thread "main" java.util.regex.PatternSyntaxException: At position
> 1 in regular expression pattern:
> quantifier (?*+{}) without preceding token
>         (?i)yoda
>          ^
>    at java.util.regex.Pattern.Pattern(java.lang.String, int)
> (/usr/lib/libgcj.so.6.0.0)
>    at java.util.regex.Pattern.compile(java.lang.String, int)
> (/usr/lib/libgcj.so.6.0.0)
>    at java.util.regex.Pattern.compile(java.lang.String)
> (/usr/lib/libgcj.so.6.0.0)
>    at ar.main(java.lang.String[]) (Unknown Source)
>    at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
>    at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
> 
> (Yes, I ran this again 4.0, but the same thing happens in 4.1).

With GNU classpath CVS HEAD and jamvm 1.4.2 this throws no exception so
this is fixed in it it seems. Perhaps all the gnu.regexp fixes should be
ported to 4.1?


Cheers,
Michael


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug classpath/26177] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
  2006-02-08 17:11 ` [Bug libgcj/26177] " konqueror at gmx dot de
@ 2006-02-08 17:22 ` mark at gcc dot gnu dot org
  2006-02-08 17:32 ` [Bug libgcj/26177] " green at redhat dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mark at gcc dot gnu dot org @ 2006-02-08 17:22 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from mark at gcc dot gnu dot org  2006-02-08 17:22 -------
Works fine with GNU Classpath CVS


-- 

mark at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|libgcj                      |classpath
            Product|gcc                         |classpath
         Resolution|                            |FIXED
   Target Milestone|---                         |0.21
            Version|4.1.0                       |unspecified


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
  2006-02-08 17:11 ` [Bug libgcj/26177] " konqueror at gmx dot de
  2006-02-08 17:22 ` [Bug classpath/26177] " mark at gcc dot gnu dot org
@ 2006-02-08 17:32 ` green at redhat dot com
  2006-02-08 17:34 ` [Bug libgcj/26177] [4.1 only] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: green at redhat dot com @ 2006-02-08 17:32 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from green at redhat dot com  2006-02-08 17:32 -------
It's good to know this is fixed in GNU Classpath, but I filed this against
libgcj for a reason.  Reopening the bug.


-- 

green at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
          Component|classpath                   |libgcj
            Product|classpath                   |gcc
         Resolution|FIXED                       |
   Target Milestone|0.21                        |---
            Version|unspecified                 |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] [4.1 only] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
                   ` (2 preceding siblings ...)
  2006-02-08 17:32 ` [Bug libgcj/26177] " green at redhat dot com
@ 2006-02-08 17:34 ` pinskia at gcc dot gnu dot org
  2006-02-08 17:49 ` konqueror at gmx dot de
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-08 17:34 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-02-08 17:34 -------
Is this a regression?  libgcj should take care that GCC is in super release
mode now.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Exception when compiling    |[4.1 only] Exception when
                   |valid regex pattern         |compiling valid regex
                   |                            |pattern
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] [4.1 only] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
                   ` (3 preceding siblings ...)
  2006-02-08 17:34 ` [Bug libgcj/26177] [4.1 only] " pinskia at gcc dot gnu dot org
@ 2006-02-08 17:49 ` konqueror at gmx dot de
  2006-02-08 17:52 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: konqueror at gmx dot de @ 2006-02-08 17:49 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from konqueror at gmx dot de  2006-02-08 17:49 -------
Subject: Re:  [4.1 only] Exception when compiling valid regex pattern

No, this is no regression. Java is not release critical to GCC so we
should just fix this bug as we fix many other bugs too. Not just
regressions.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] [4.1 only] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
                   ` (4 preceding siblings ...)
  2006-02-08 17:49 ` konqueror at gmx dot de
@ 2006-02-08 17:52 ` pinskia at gcc dot gnu dot org
  2006-02-08 18:54 ` tromey at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-08 17:52 UTC (permalink / raw)
  To: java-prs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-02-08 17:52 -------
(In reply to comment #5)
> Subject: Re:  [4.1 only] Exception when compiling valid regex pattern
> 
> No, this is no regression. Java is not release critical to GCC so we
> should just fix this bug as we fix many other bugs too. Not just
> regressions.

But if it unstablizes gcj, it is not worth the fix at least this late in the
game.  Also it is time just like fortran to start thinking about allowing for
java to be release critical to GCC (see Mark M.'s email at
http://gcc.gnu.org/ml/fortran/2006-02/msg00095.html ).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] [4.1 only] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
                   ` (5 preceding siblings ...)
  2006-02-08 17:52 ` pinskia at gcc dot gnu dot org
@ 2006-02-08 18:54 ` tromey at gcc dot gnu dot org
  2006-02-10 19:52 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-02-08 18:54 UTC (permalink / raw)
  To: java-prs



------- Comment #7 from tromey at gcc dot gnu dot org  2006-02-08 18:54 -------
The regex changes are unlikely to cause big destabilization for 3 reasons:

* They are pure java
* The regex code has historically been somewhat broken, so we're unlikely
  to make the situation worse
* They've been tested in classpath using mauve

I'll look at this a bit.  I'm leaning toward including the changes in 4.1
because we've seen more than one application now with regexes that hit
libgcj bugs.

Andrew, I agree with your point in general.  We should probably discuss it
in some forum other than a random regex bug report though :-)


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-08 18:54:56
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] [4.1 only] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
                   ` (6 preceding siblings ...)
  2006-02-08 18:54 ` tromey at gcc dot gnu dot org
@ 2006-02-10 19:52 ` tromey at gcc dot gnu dot org
  2006-02-10 19:53 ` tromey at gcc dot gnu dot org
  2006-02-10 19:54 ` tromey at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-02-10 19:52 UTC (permalink / raw)
  To: java-prs



------- Comment #8 from tromey at gcc dot gnu dot org  2006-02-10 19:52 -------
Subject: Bug 26177

Author: tromey
Date: Fri Feb 10 19:52:44 2006
New Revision: 110847

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110847
Log:
        Re-merged all regular expression code.
        For PR libgcj/26177, PR libgcj/26202.
        See classpath/ChangeLog.gcj for full details.
        * java/lang/Character.java: Merged from Classpath.
        (start, end): Now 'int's.
        (canonicalName): New field.
        (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
        (UnicodeBlock): Added argument.
        (of): New overload.
        (forName): New method.
        Updated unicode blocks.
        (sets): Updated.
        * sources.am, Makefile.in: Rebuilt.
        * gnu/regexp/MessagesBundle_fr.properties: Removed.
        * gnu/regexp/MessagesBundle.properties: Removed.

Added:
   
branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenIndependent.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenLookBehind.java
   
branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenNamedProperty.java
    branches/gcc-4_1-branch/libjava/classpath/java/util/regex/MatchResult.java
Removed:
    branches/gcc-4_1-branch/libjava/gnu/regexp/MessagesBundle.properties
    branches/gcc-4_1-branch/libjava/gnu/regexp/MessagesBundle_fr.properties
Modified:
    branches/gcc-4_1-branch/libjava/ChangeLog
    branches/gcc-4_1-branch/libjava/Makefile.in
    branches/gcc-4_1-branch/libjava/classpath/ChangeLog.gcj
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/CharIndexed.java
   
branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/CharIndexedCharArray.java
   
branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/CharIndexedInputStream.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/CharIndexedString.java
   
branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/CharIndexedStringBuffer.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RE.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/REMatch.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RESyntax.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/REToken.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenAny.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenBackRef.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenChar.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenEnd.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenEndSub.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenLookAhead.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenOneOf.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenPOSIX.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenRange.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenRepeated.java
    branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenStart.java
   
branches/gcc-4_1-branch/libjava/classpath/gnu/regexp/RETokenWordBoundary.java
    branches/gcc-4_1-branch/libjava/classpath/java/net/URI.java
    branches/gcc-4_1-branch/libjava/classpath/java/util/regex/Matcher.java
    branches/gcc-4_1-branch/libjava/classpath/java/util/regex/Pattern.java
   
branches/gcc-4_1-branch/libjava/classpath/java/util/regex/PatternSyntaxException.java
    branches/gcc-4_1-branch/libjava/java/lang/Character.java
    branches/gcc-4_1-branch/libjava/sources.am


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] [4.1 only] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
                   ` (7 preceding siblings ...)
  2006-02-10 19:52 ` tromey at gcc dot gnu dot org
@ 2006-02-10 19:53 ` tromey at gcc dot gnu dot org
  2006-02-10 19:54 ` tromey at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-02-10 19:53 UTC (permalink / raw)
  To: java-prs



------- Comment #9 from tromey at gcc dot gnu dot org  2006-02-10 19:53 -------
Fix checked in.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libgcj/26177] [4.1 only] Exception when compiling valid regex pattern
  2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
                   ` (8 preceding siblings ...)
  2006-02-10 19:53 ` tromey at gcc dot gnu dot org
@ 2006-02-10 19:54 ` tromey at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-02-10 19:54 UTC (permalink / raw)
  To: java-prs



------- Comment #10 from tromey at gcc dot gnu dot org  2006-02-10 19:54 -------
Forgot to mark as fixed.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26177


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-02-10 19:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-08 17:03 [Bug libgcj/26177] New: Exception when compiling valid regex pattern green at redhat dot com
2006-02-08 17:11 ` [Bug libgcj/26177] " konqueror at gmx dot de
2006-02-08 17:22 ` [Bug classpath/26177] " mark at gcc dot gnu dot org
2006-02-08 17:32 ` [Bug libgcj/26177] " green at redhat dot com
2006-02-08 17:34 ` [Bug libgcj/26177] [4.1 only] " pinskia at gcc dot gnu dot org
2006-02-08 17:49 ` konqueror at gmx dot de
2006-02-08 17:52 ` pinskia at gcc dot gnu dot org
2006-02-08 18:54 ` tromey at gcc dot gnu dot org
2006-02-10 19:52 ` tromey at gcc dot gnu dot org
2006-02-10 19:53 ` tromey at gcc dot gnu dot org
2006-02-10 19:54 ` tromey at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).