harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Fedotov" <alexei.fedo...@gmail.com>
Subject Re: [drlvm] New regression: java.lang.ClassGenericsTest4
Date Wed, 15 Nov 2006 11:56:09 GMT
All,
I wonder if we should apply "zero regression" policy to this change.
Speaking simply, should this patch be reverted and kept for additional
investigation?


On 11/15/06, Alexey Varlamov <alexey.v.varlamov@gmail.com> wrote:
> The guilty change is the following, which effectively turns on
> VM_LAZY_EXCEPTION support in exceptions_impl.cpp:
>
> Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp
> URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp?view=diff&rev=475029&r1=475028&r2=475029
> ==============================================================================
> --- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp
> (original)
> +++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp
> Tue Nov 14 14:45:45 2006
> @@ -26,6 +26,7 @@
>  #include "Class.h"
>  #include "classloader.h"
>  #include "exceptions.h"
> +#include "exceptions_impl.h"
>  #include "exceptions_jit.h"
>  #include "exceptions_type.h"
>  #include "environment.h"
>
> So the problem most probably in exn_throw_by_class_internal()
> function, will look closer after lunch.
>
> 2006/11/15, Alexey Varlamov <alexey.v.varlamov@gmail.com>:
> > Heh, this regression is more interesting than it looked at first glance:
> > JITs give the same output with identical stack trace, but test result is PASSED.
> > By lucky chance I have older debug build at hand (svn = r474646) and
> > it also spills this stacktrace to system err but status is PASSED for
> > all execution engines.
> > Looks like smth hase changed in exceptions processing for interpreter.
> >
> > 2006/11/15, Gregory Shimansky <gshimansky@gmail.com>:
> > > Hello
> > >
> > > Today a kernel tests which used to pass a day ago started to fail. It is
> > > java.lang.ClassGenericsTest4 (subtest test_3) [1]. I tried to revert some VM
> > > and classlib (since some important classes like URLClassLoader, Hashtable and
> > > TreeMap were changed recently) patches but no reversion helped. It may be a
> > > cumulative effect of the patches now makes the test fail.
> > >
> > > It fails somewhere deep inside of signature parser. The problem is also that
> > > class format parses uses antlr which makes the whole parsing quite complex.
> > > The failure happens on a BadSignatureTemplate class which is constructed from
> > > bytes, parsed and its method is invoked. Apparently it has a wrong signature
> > > (surprise :) ).
> > >
> > > The whole purpose of the test is not clear to me more surprising is that it
> > > works on RI (not on BEA). If someone could point to what may be wrong now
> > > with this test I would be very grateful.
> > >
> > > I also wonder why there is no InvocationTargetException which should be
> > > chained with the down the stack Exception. The test_3 method uses reflection
> > > to invoke a method BadSignatureTemplate.test_1 which in its turn threw an
> > > Exception in parser. Shouldn't there be an InvocationTargetException as the
> > > result of Method.invoke?
> > >
> > > Where can I look at BadSignatureTemplate.java, specifically line 13 which
> > > according to the stack called Class.getTypeParameters?
> > >
> > > [1]
> > >
> > > [gregory@localhost:
> > > 10113$] ./lnx_ia32_gcc_debug/deploy/jre/bin/java -Xint -Xbootclasspath/a:./lnx_ia32_gcc_debug/semis/kernel.tests/classes:./make/tmp/junit.jar
-Dtest.resource.path=./lnx_ia32_gcc_debug/semis/kernel.tests/resources
> > > junit.textui.TestRunner java.lang.ClassGenericsTest4
> > > ..../lnx_ia32_gcc_debug/semis/kernel.tests/resources/org/apache/harmony/lang/generics/BadSignatureTemplate.class
> > > java.lang.Exception
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureLexer2.nextToken(SignatureLexer2.java:420)
> > >        at antlr.TokenBuffer.fill(TokenBuffer.java:69)
> > >        at antlr.TokenBuffer.LA(TokenBuffer.java:80)
> > >        at antlr.LLkParser.LA(LLkParser.java:52)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__SIMPLE_CLASS_TYPE_SIGNATURE(SignatureParser.java:1457)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE_SUFFIXES(SignatureParser.java:1736)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__REFERENCE(SignatureParser.java:1408)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE(SignatureParser.java:980)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FIELD_TYPE_SIGNATURE(SignatureParser.java:844)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__BOUND(SignatureParser.java:1311)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_OR_INTERFACE_BOUNDS(SignatureParser.java:1278)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETER(SignatureParser.java:1183)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS(SignatureParser.java:1152)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS_DECL(SignatureParser.java:951)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_DECL(SignatureParser.java:535)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__DECL(SignatureParser.java:480)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.parseSignature(SignatureParser.java:378)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.Parser.parseSignature(Parser.java:38)
> > >        at java.lang.Class$GACache.getTypeParameters(Class.java:1551)
> > >        at java.lang.Class.getTypeParameters(Class.java:1020)
> > >        at org.apache.harmony.lang.generics.BadSignatureTemplate.test_1
> > > (BadSignatureTemplate.java:13)
> > >        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> > >        at java.lang.reflect.Method.invoke(Method.java:381)
> > >        at java.lang.ClassGenericsTest4.test_3(ClassGenericsTest4.java:793)
> > >        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> > >        at java.lang.reflect.Method.invoke(Method.java:381)
> > >        at junit.framework.TestCase.runTest(TestCase.java:154)
> > >        at junit.framework.TestCase.runBare(TestCase.java:127)
> > >        at junit.framework.TestResult$1.protect(TestResult.java:106)
> > >        at junit.framework.TestResult.runProtected(TestResult.java:124)
> > >        at junit.framework.TestResult.run(TestResult.java:109)
> > >        at junit.framework.TestCase.run(TestCase.java:118)
> > >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> > >        at junit.framework.TestSuite.run(TestSuite.java:203)
> > >        at junit.textui.TestRunner.doRun(TestRunner.java:116)
> > >        at junit.textui.TestRunner.start(TestRunner.java:172)
> > >        at junit.textui.TestRunner.main(TestRunner.java:138)
> > > ===nextToken===: java.lang.Exception
> > > antlr.TokenStreamException
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureLexer2.nextToken(SignatureLexer2.java:434)
> > >        at antlr.TokenBuffer.fill(TokenBuffer.java:69)
> > >        at antlr.TokenBuffer.LA(TokenBuffer.java:80)
> > >        at antlr.LLkParser.LA(LLkParser.java:52)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__SIMPLE_CLASS_TYPE_SIGNATURE(SignatureParser.java:1457)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE_SUFFIXES(SignatureParser.java:1736)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__REFERENCE(SignatureParser.java:1408)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_TYPE_SIGNATURE(SignatureParser.java:980)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FIELD_TYPE_SIGNATURE(SignatureParser.java:844)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__BOUND(SignatureParser.java:1311)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_OR_INTERFACE_BOUNDS(SignatureParser.java:1278)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETER(SignatureParser.java:1183)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS(SignatureParser.java:1152)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__FORMAL_TYPE_PARAMETERS_DECL(SignatureParser.java:951)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__CLASS_DECL(SignatureParser.java:535)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.pr__DECL(SignatureParser.java:480)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.SignatureParser.parseSignature(SignatureParser.java:378)
> > >        at
> > > org.apache.harmony.lang.reflect.parser.Parser.parseSignature(Parser.java:38)
> > >        at java.lang.Class$GACache.getTypeParameters(Class.java:1551)
> > >        at java.lang.Class.getTypeParameters(Class.java:1020)
> > >        at org.apache.harmony.lang.generics.BadSignatureTemplate.test_1
> > > (BadSignatureTemplate.java:13)
> > >        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> > >        at java.lang.reflect.Method.invoke(Method.java:381)
> > >        at java.lang.ClassGenericsTest4.test_3(ClassGenericsTest4.java:793)
> > >        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
> > >        at java.lang.reflect.Method.invoke(Method.java:381)
> > >        at junit.framework.TestCase.runTest(TestCase.java:154)
> > >        at junit.framework.TestCase.runBare(TestCase.java:127)
> > >        at junit.framework.TestResult$1.protect(TestResult.java:106)
> > >        at junit.framework.TestResult.runProtected(TestResult.java:124)
> > >        at junit.framework.TestResult.run(TestResult.java:109)
> > >        at junit.framework.TestCase.run(TestCase.java:118)
> > >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> > >        at junit.framework.TestSuite.run(TestSuite.java:203)
> > >        at junit.textui.TestRunner.doRun(TestRunner.java:116)
> > >        at junit.textui.TestRunner.start(TestRunner.java:172)
> > >        at junit.textui.TestRunner.main(TestRunner.java:138)
> > > TokenStreamException: antlr.TokenStreamException
> > > E
> > > Time: 71.596
> > > There was 1 error:
> > > 1) test_3(java.lang.ClassGenericsTest4)java.lang.NullPointerException
> > >
> > >
> > > --
> > > Gregory Shimansky, Intel Middleware Products Division
> > >
> >
>


-- 
Thank you,
Alexei

Mime
View raw message