You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2007/01/12 08:40:27 UTC

[jira] Updated: (HARMONY-1840) [drlvm][jit] Jitrino JET crashes when returnAddress is on the top of the stack before astore or astore_ instruction

     [ https://issues.apache.org/jira/browse/HARMONY-1840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey Varlamov updated HARMONY-1840:
-------------------------------------

    Component/s:     (was: VM)
                 DRLVM

> [drlvm][jit] Jitrino JET crashes when returnAddress is on the top of the stack before astore or astore_<n> instruction
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1840
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1840
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows IA-32, Linux IA-32
>            Reporter: Irina Arkhipets
>         Attachments: test.j
>
>
> J2SE VM Specification reads about astore_<n> instruction:
> ...
> The <n> must be a valid index into the local variables of the current frame (ยง3.6). The objectref on the top of the operand stack must be of type returnAddress or of type reference. It is popped from the operand stack, and the value of the local variable at <n> is set to objectref.
> ...
> However, Jitrino JET crashes when the value on the top of the stack is returnAddress.
> The following test example crashes with Jitrino JET both on Linux IA-32 and Windows IA-32 with  `jsr_lead == pc' assertion.
> Stack trace shows that the problem is in the JET code (please, see sample output below).
> --------- test.j ---------
> .class public test
> .super java/lang/Object
> .method public <init>()V
>     aload_0
>     invokespecial java/lang/Object/<init>()V
>     return
> .end method
> .method public static main([Ljava/lang/String;)V
>     .limit stack 10
>     .limit locals 10
>     new test
>     dup
>     invokespecial test/<init>()V
>     invokevirtual test/tryme()V
>     return
> .end method
> .method public tryme()V
>     jsr L1
>     nop
> L1:
>     astore_0
>     return
> .end method
> -----------------------------
> This test passes with JRockit and interpreter.
> This test fails in OPT mode with another error diagnostic, I am going to file a separate bug about this.
> Sample output is:
> ...
> java: /export/users2/iarkhipe/20061012/trunk/working_vm/vm/jitrino/src/jet/compiler.cpp:873: bool Jitrino::Jet::Compiler::comp_gen_insts(unsigned int, unsigned int, unsigned int): Assertion `jsr_lead == pc' failed.
> SIGABRT in VM code.
> Stack trace:
>         1: ?? (??:-1)
>         2: abort (??:-1)
>         3: __assert_fail (??:-1)
>         4: Jitrino::Jet::Compiler::comp_gen_insts(unsigned int, unsigned int, unsigned int) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/jitrino/src/jet/compiler.cpp:875)
>         5: Jitrino::Jet::Compiler::comp_gen_code_bb(unsigned int) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/jitrino/src/jet/compiler.cpp:817)
>         6: Jitrino::Jet::Compiler::compile(void*, Method*, OpenMethodExecutionParams const&) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/jitrino/src/jet/compiler.cpp:389)
>         7: Jitrino::Jet::compile_with_params(void*, void*, Method*, OpenMethodExecutionParams) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/jitrino/src/jet/jet.cpp:508)
>         8: JIT_compile_method_with_params (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/jitrino/src/vm/drl/DrlJITInterface.cpp:277)
>         9: Dll_JIT::compile_method_with_params(void*, Method*, OpenMethodExecutionParams) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/include/dll_jit_intf.h:86)
>         10: compile_do_compilation_jit(Method*, JIT*) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:700)
>         11: vm_compile_method (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/class_support/C_Interface.cpp:2538)
>         12: DrlEMImpl::compileMethod(Method*) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/em/src/DrlEMImpl.cpp:520)
>         13: CompileMethod (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/em/src/em_intf.cpp:49)
>         14: compile_do_compilation (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:780)
>         15: compile_jit_a_method(Method*) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/jit/compile.cpp:828)
>         16: IP is 0x410D0172 <native code>
>         17: test.main([Ljava/lang/String;)V (test.j:-1)
>         18: vm_invoke_native_array_stub (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/util/ia32/base/invoke_native_stub_ia32.asm:41)
>         19: JIT_execute_method_default(void*, _jmethodID*, jvalue*, jvalue*) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/util/ia32/base/ini_iA32.cpp:199)
>         20: DrlEMImpl::executeMethod(_jmethodID*, jvalue*, jvalue*) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/em/src/DrlEMImpl.cpp:489)
>         21: ExecuteMethod (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/em/src/em_intf.cpp:43)
>         22: vm_execute_java_method_array(_jmethodID*, jvalue*, jvalue*) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/jit/ini.cpp:58)
>         23: call_static_method_no_ref_result (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/jni/jni_method.cpp:1072)
>         24: CallStaticVoidMethodA(JNIEnv_External*, _jobject*, _jmethodID*, jvalue*) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/jni/jni_method.cpp:1450)
>         25: CallStaticVoidMethodV(JNIEnv_External*, _jobject*, _jmethodID*, char*) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/jni/jni_method.cpp:1437)
>         26: CallStaticVoidMethod(JNIEnv_External*, _jobject*, _jmethodID*, ...) (/export/users2/iarkhipe/20061012/trunk/working_vm/vm/vmcore/src/jni/jni_method.cpp:1427)
>         27: ?? (??:-1)
>         28: ?? (??:-1)
>         29: ?? (??:-1)
>         30: ?? (??:-1)
>         31: hysig_protect (??:-1)
>         32: ?? (??:-1)
>         33: __libc_start_main (??:-1)
>         34: ?? (??:-1)
> <end of stack trace>
> Aborted
> ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira