harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elena Sayapina (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4349) [drlvm][jit][jet] NoSuchMethodError isn't thrown if class doesn't have a definition of called constructor
Date Thu, 05 Jul 2007 08:14:04 GMT
[drlvm][jit][jet] NoSuchMethodError isn't thrown if class doesn't have a definition of called
constructor 
----------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4349
                 URL: https://issues.apache.org/jira/browse/HARMONY-4349
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Elena Sayapina


NoSuchMethodError isn't thrown with Jitrino.JET if class doesn't have a definition of called
constructor, 
i.e. it present at compile time but absent at runtime

Please, also note that this behavior was observed up to r553372, 
Harmony crashes in JET mode on this revision on the test below, 
Possibly it's connected with recent lazy resolution enabling in JET

Please, consider the following code:

public class Test {

	public static void main(String[] args) {
		try {
			TestClass obj = new TestClass(); 
			System.out.println("TEST FAILED: no exception");
		} catch (NoSuchMethodError e) {
			System.out.println("TEST PASSED");
		} catch (Throwable e) {
			e.printStackTrace();
			System.out.println("TEST FAILED: unexpected " + e);
		}
	}
}

public class TestClass {

	TestClass() {
		
	}
}

Steps to reproduce:

1) compile Test class
2) change TestClass constructor TestClass() to TestClass(int i) and recompile TestClass
3) run Test class on Harmony with -Xem:jet

You may also use compiled classes from attached reproduce.zip

Output on Harmony-r553113 with -Xem:jet :

Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0"
pre-alpha : not complete or compatible
svn = r553113, (Jul  4 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org

TEST FAILED: no exception

Test crashed on Harmony-r553372-msvc-release on WinXP with the following call stack:

>	harmonyvm.dll!rth_invokespecial_addr_withresolve(Class * klass=0x0013f95c, unsigned int
cp_idx=544669624)  Line 2050	C++
 	harmonyvm.dll!free(void * pBlock=0x01ffb2f8)  Line 103 + 0x5	C
 	harmonyvm.dll!GcFrame::~GcFrame()  Line 99 + 0x6	C++
 	harmonyvm.dll!compile_me(Method * method=0x2076d494)  Line 819	C++
 	harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f95c, int sz=1, void
* f=0x023b0010)  Line 77	C++
 	harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x01ffbe44,
jvalue * return_value=0x00000000, jvalue * args=0x01fa1430)  Line 200	C++
 	em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x01ffbe44, jvalue * return_value=0x00000000,
jvalue * args=0x01fa1430)  Line 509 + 0x14	C++
 	em.dll!ExecuteMethod(_jmethodID * meth=0x01ffbe44, jvalue * return_value=0x00000000, jvalue
* args=0x01fa1430)  Line 44	C++
 	harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x01ffbe44, jvalue * result=0x00000000,
jvalue * args=0x01fa1430)  Line 60 + 0x19	C++
 	harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011a0d98, _jobject * clazz=0x02007558,
_jmethodID * methodID=0x01ffbe44, char * args=0x0013fa14)  Line 1546 + 0x2c	C++
 	harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011a0d98, _jobject * clazz=0x02007558,
_jmethodID * methodID=0x01ffbe44, ...)  Line 1537	C++
 	java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011a0d98, char * mainClassName=0x003a3fbc,
int nameIsUTF=0, int java_argc=0, char * * java_argv=0x003a2bd8, HyPortLibrary * portLibrary=0x0013fbb8)
 Line 1321 + 0x1b	C
 	java.exe!invocation(HyPortLibrary * portLibrary=0x0013fbb8, int argc=4, char * * argv=0x003a2bc8,
unsigned int handle=5308416, int version=65540, unsigned char ignoreUnrecognized=' ', char
* mainClass=0x003a3fbc, unsigned int classArg=3, char * propertiesFileName=0x00155e38, int
isStandaloneJar=0, char * vmdllsubdir=0x0013fb40)  Line 742 + 0x2c	C
 	java.exe!gpProtectedMain(haCmdlineOptions * args=0x0013fb90)  Line 391 + 0x33	C
 	java.exe!main(int argc=4, char * * argv=0x003a2bc8, char * * envp=0x003a3080)  Line 146
+ 0xc	C
 	java.exe!mainCRTStartup()  Line 398 + 0xe	C
 	kernel32.dll!7c816fd7() 	

Please, note that the test passes on Harmony with -Xint, -Xem:opt

Output on RI:

java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, interpreted mode)

TEST PASSED


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message