Title: Problems on AIX

Hi,
I'm running regexp under AIX using JDK1.3.  I'm trying to get IBM to acknowledge what I believe is a problem in their JVM.  The problem only occurs when using the JIT.

I've included a copy of a correspondence with IBM (below).

My regular expression is "(%)(\d)" which is used to detect patterns of %x (where x is a digit) in strings.

Here is the code that fails.  Do people agree that it is valid code, and a valid regular expression?  Does anyone have any suggestions on how we can pin point what actually causes the crash?


import org.apache.regexp.*;
public class RETest {
public RETest() {
}
public static void main (String args[])
{
try
{
RECompiler compiler = new RECompiler();
REProgram compiledParameterFinderRE = compiler.compile("(%)(\\d)");
System.out.println("RE Compiled");
}
catch (RESyntaxException e)
{
e.printStackTrace();
}
System.out.println("Finished");
}
Exception in thread "main" java.lang.Error: Internal error!
at org.apache.regexp.RECompiler.atom(RECompiler.java(Compiled Code))
at org.apache.regexp.RECompiler.atom(RECompiler.java(Compiled Code))
at org.apache.regexp.RECompiler.terminal(RECompiler.java(Compiled Code))
at org.apache.regexp.RECompiler.closure(RECompiler.java(Compiled Code))
at org.apache.regexp.RECompiler.branch(RECompiler.java(Compiled Code))
at org.apache.regexp.RECompiler.expr(RECompiler.java(Compiled Code))
at org.apache.regexp.RECompiler.terminal(RECompiler.java(Compiled Code))
at org.apache.regexp.RECompiler.closure(RECompiler.java(Compiled Code))
at org.apache.regexp.RECompiler.branch(RECompiler.java:1151)
at org.apache.regexp.RECompiler.expr(RECompiler.java:1203)
at org.apache.regexp.RECompiler.compile(RECompiler.java:1281)
at RETest.main(RETest.java:28)




>>I have tried the test case "as is" and as expected it failed with the same error.  The test case was then tried with back levels of regexp as well as a newer "nightly build" and the same problem occurred.

>> The same test case was then tried with the IBM JDK version 1.2.2 and everything seems to work OK.  This would provide a workaround as long as you do not need JDK 1.3 for other areas of your code.

>> The errors that occur with JDK 1.3 are more problematic.  The java.lang.Error that is produced seems to be thrown by the regexp code itself (shown by running with trace) and this is a documented feature of regexp (the error being thrown when an unexpected error or bug is encountered internally in regexp).  The test case itself is puzzling as we cannot determine exactly what the following regular expression is designed to match: "(%)(\\d)".

>> It would be very useful to identify the area of the regexp source code that deals with the java.lang.Error and the circumstances under which it gets thrown.

>> Before raising any potential bug report for the JVM I believe there will have to be further work examining the regexp code and pinning down more firmly the reason for the java.lang.Error plus the test case would need explaining to clarify why it is a valid test.



Ian Beaumont
Categoric Software

Alert enabling the multichannel enterprise

+44 (0)1372 368800 tel
+44 (0)1372 368801 fax
+44 (0)1372 368854 direct
www.categoric.com

This message is intended only for the use of the person(s) to whom it is addressed. It may contain information which is privileged and confidential. Accordingly any unauthorised use is strictly prohibited. If you are not the Intended Recipient, please contact the sender as soon as possible.

Reply via email to