Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 93284 invoked from network); 29 Jun 2007 09:17:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jun 2007 09:17:28 -0000 Received: (qmail 32123 invoked by uid 500); 29 Jun 2007 09:17:29 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 32097 invoked by uid 500); 29 Jun 2007 09:17:29 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 32085 invoked by uid 99); 29 Jun 2007 09:17:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2007 02:17:29 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2007 02:17:25 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CB68B71418F for ; Fri, 29 Jun 2007 02:17:04 -0700 (PDT) Message-ID: <2351099.1183108624829.JavaMail.jira@brutus> Date: Fri, 29 Jun 2007 02:17:04 -0700 (PDT) From: "Pavel Ozhdikhin (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4267) [drlvm][jit][opt] Jitrino.OPT crashes instead of throwing NoClassDefFoundError In-Reply-To: <31723433.1182499228837.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Ozhdikhin updated HARMONY-4267: ------------------------------------- Attachment: 4267-full.patch The updated patch including a complete solution and the regression test. Passed "build test" and "reg.test" tests on Win32. > [drlvm][jit][opt] Jitrino.OPT crashes instead of throwing NoClassDefFoundError > ------------------------------------------------------------------------------ > > Key: HARMONY-4267 > URL: https://issues.apache.org/jira/browse/HARMONY-4267 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Reporter: Elena Sayapina > Attachments: 4267-full.patch, 4267.patch > > > Jitrino.OPT crashes instead of throwing NoClassDefFoundError if call a method with array of objects of non-existing class as returning type > Please, consider the following code: > ------------------------------------------------------- > public class Reproduce { > > public static void main(String [] args) { > new TClass().test1(); > } > } > class TClass { > > void test1() { > RemoveMe[] arr = test(); > RemoveMe element = arr[3]; > } > RemoveMe[] test() { > return new RemoveMe[10]; > } > } > class RemoveMe {} > --------------------------------------------------------------- > Steps to reproduce: > 1) compile Reproduce class > 2) remove RemoveMe.class > 3) run Reproduce.class > Output on Harmony-r549703 with -Xem:opt: > 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 = r549703, (Jun 22 2007), Windows/ia32/msvc 1310, release build > http://harmony.apache.org > Windows reported exception: 0xc0000005 > Registers: > EAX: 0xdeadbeef, EBX: 0x02362208, ECX: 0xdeadbeef, EDX: 0x013ed268 > ESI: 0x0236210c, EDI: 0x020aa785, ESP: 0x0013edf0, EBP: 0x00000005 > EIP: 0x00511884 > Stack trace: > 0: class_get_name (c:\bt\build\checkouts\drlvm\vm\vmcore\src\class_support\c_interface.cpp:553) > 1: ?? (??:-1) > > The callstack is: > > harmonyvm.dll!class_get_name(Class * cl=0xdeadbeef) Line 553 + 0x4 C++ > jitrino.dll!Jitrino::ObjectType::getName() Line 803 + 0x9 C++ > jitrino.dll!Jitrino::JavaByteCodeTranslator::genLdVar(unsigned int varIndex=1, Jitrino::JavaLabelPrepass::JavaVarType javaType=A) Line 1931 + 0x8 C++ > jitrino.dll!Jitrino::JavaByteCodeTranslator::aload(unsigned short varIndex=1) Line 694 C++ > jitrino.dll!Jitrino::JavaByteCodeParserCallback::parseByteCode(const unsigned char * byteCodes=0x020aa5a8, unsigned int off=1) Line 365 + 0x9 C++ > jitrino.dll!Jitrino::ByteCodeParser::parse(Jitrino::ByteCodeParserCallback * cb=0x0013eef0) Line 70 + 0xe C++ > jitrino.dll!Jitrino::JavaTranslator::translateMethod(Jitrino::CompilationInterface & ci={...}, Jitrino::MethodDesc & methodDesc={...}, Jitrino::IRBuilder & irBuilder={...}) Line 57 C++ > jitrino.dll!Jitrino::TranslatorSession::translate() Line 68 + 0xf C++ > jitrino.dll!Jitrino::TranslatorSession::run() Line 51 C++ > jitrino.dll!Jitrino::Inliner::createInlineNode(Jitrino::CompilationContext & inlineCC={...}, Jitrino::MethodCallInst * call=0x0231b908) Line 983 C++ > jitrino.dll!Jitrino::Inliner::getNextRegionToInline(Jitrino::CompilationContext & inlineCC={...}) Line 957 C++ > jitrino.dll!Jitrino::InlinePass::_run(Jitrino::IRManager & irm={...}) Line 1187 + 0x3b C++ > jitrino.dll!Jitrino::OptPass::run() Line 63 C++ > jitrino.dll!Jitrino::runPipeline(Jitrino::CompilationContext * c=0x0013f43c) Line 230 C++ > jitrino.dll!Jitrino::Jitrino::CompileMethod(Jitrino::CompilationContext * cc=0x0013f43c) Line 269 + 0x15 C++ > jitrino.dll!JIT_compile_method_with_params(void * jit=0x0119ee40, void * compilation=0x0013f6d8, Method * method_handle=0x020a2fec, OpenMethodExecutionParams compilation_params={...}) Line 284 + 0xa C++ > harmonyvm.dll!Dll_JIT::compile_method_with_params(void * compilation=0x0013f6d8, Method * method=0x020a2fec, OpenMethodExecutionParams flags={...}) Line 86 + 0x12 C++ > harmonyvm.dll!compile_do_compilation_jit(Method * method=0x020a2fec, JIT * jit=0x0119ee40) Line 658 + 0x16 C++ > harmonyvm.dll!vm_compile_method(void * jit=0x0119ee40, Method * method=0x020a2fec) Line 2572 + 0xf C++ > em.dll!DrlEMImpl::compileMethod(Method * mh=0x020a2fec) Line 545 + 0x12 C++ > em.dll!CompileMethod(Method * method_handle=0x020a2fec) Line 50 C++ > harmonyvm.dll!compile_do_compilation(Method * method=0xdeadbeef) Line 774 + 0x10 C++ > harmonyvm.dll!compile_me(Method * method=0x20770dfc) Line 795 C++ > harmonyvm.dll!vm_invoke_native_array_stub(unsigned int * args=0x0013f95c, int sz=1, void * f=0x031b0010) Line 77 C++ > harmonyvm.dll!JIT_execute_method_default(void * jit=0x00000000, _jmethodID * methodID=0x020a2fec, jvalue * return_value=0x00000000, jvalue * args=0x020a8218) Line 200 C++ > em.dll!DrlEMImpl::executeMethod(_jmethodID * meth=0x020a2fec, jvalue * return_value=0x00000000, jvalue * args=0x020a8218) Line 509 + 0x14 C++ > em.dll!ExecuteMethod(_jmethodID * meth=0x020a2fec, jvalue * return_value=0x00000000, jvalue * args=0x020a8218) Line 44 C++ > harmonyvm.dll!vm_execute_java_method_array(_jmethodID * method=0x020a2fec, jvalue * result=0x00000000, jvalue * args=0x020a8218) Line 60 + 0x19 C++ > harmonyvm.dll!CallStaticVoidMethodV(JNIEnv_External * jni_env=0x011a19c0, _jobject * clazz=0x0201ea10, _jmethodID * methodID=0x020a2fec, char * args=0x0013fa14) Line 1546 + 0x2c C++ > harmonyvm.dll!CallStaticVoidMethod(JNIEnv_External * jni_env=0x011a19c0, _jobject * clazz=0x0201ea10, _jmethodID * methodID=0x020a2fec, ...) Line 1537 C++ > java.exe!main_runJavaMain(const JNINativeInterface_ * * env=0x011a19c0, 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=0x00155de8, 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() > Output on Harmony-r549703 in default mode: > 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 = r549703, (Jun 22 2007), Windows/ia32/msvc 1310, release build > http://harmony.apache.org > Uncaught exception in main: > java.lang.NoClassDefFoundError: RemoveMe > at TClass.test1(Reproduce.java:11) > at Reproduce.main(Reproduce.java:4) > Caused by: java.lang.ClassNotFoundException: RemoveMe > at java.net.URLClassLoader.findClass(URLClassLoader.java:895) > at java.lang.ClassLoader.loadClass(ClassLoader.java:575) > at java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:963) > at java.lang.ClassLoader.loadClass(ClassLoader.java:319) > at TClass.test1(Reproduce.java:11) > ... 1 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.