You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ivan Popov (JIRA)" <ji...@apache.org> on 2006/12/21 12:47:21 UTC

[jira] Created: (HARMONY-2833) [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object

[drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object
-------------------------------------------------------------------------------

                 Key: HARMONY-2833
                 URL: http://issues.apache.org/jira/browse/HARMONY-2833
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: Windows/ia32, Linux/ia32
            Reporter: Ivan Popov


DRLVM (r489057) with JDWP agent crashed while debugging HelloWorld in Eclipse debugger.

The crash is because of NULL pointer access inside JVMTI function GetObjectClass(), which is invoked for exception object passed to Exception callback during classlib initialization (i.e., before main() is invoked). 

Here is stack trace from VC++ debugger:

	harmonyvm.dll!GetObjectClass(JNIEnv_External * jni_env=0x01173930, _jobject * obj=0x027773f0)  Line 1088	C++
>	jdwp.dll!JNIEnv_::GetObjectClass(_jobject * obj=0x027773f0)  Line 854 + 0x12	C++
 	jdwp.dll!jdwp::RequestManager::HandleException(_jvmtiEnv * jvmti=0x011757b0, JNIEnv_ * jni=0x01173930, _jobject * thread=0x027773f4, _jmethodID * method=0x02766ba4, __int64 location=10, _jobject * exception=0x027773f0, _jmethodID * catch_method=0x02766ba4, __int64 catch_location=24)  Line 932 + 0xc	C++
 	harmonyvm.dll!jvmti_send_exception_event(_jobject * exn_object=0x027773f0, Method * method=0x02766ba4, __int64 location=10, Method * catch_method=0x02766ba4, __int64 catch_location=24)  Line 1288	C++
 	harmonyvm.dll!jvmti_jit_exception_event_callback_call(ManagedObject * exn_object=0x00000000, JIT * jit=0x00f12730, Method * method=0x02766ba4, void * native_location=0x02e331d8, JIT * catch_jit=0x00f12730, Method * catch_method=0x02766ba4, void * native_catch_location=0x02e332d9)  Line 1385	C++
 	harmonyvm.dll!exn_propagate_exception(StackIterator * si=0x0272c310, ManagedObject * * exn_obj=0x0012e57c, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 315	C++
 	harmonyvm.dll!exn_throw_for_JIT(ManagedObject * exn_obj=0x00000000, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 425	C++
 	harmonyvm.dll!exn_athrow(ManagedObject * exn_obj=0x0012e7f4, Class * exn_class=0x0012e7f4, Method * exn_constr=0x0012e7f4, unsigned char * exn_constr_args=0x01676339)  Line 445 + 0x1b	C++
 	harmonyvm.dll!free(void * pBlock=0x41400000)  Line 103 + 0x5	C
 	harmonyvm.dll!free(void * pBlock=)  Line 103 + 0x5	C

To reproduce this crash:

1. Create DRLVM build and copy there jdwp and dt_socket libraries from jdktools build (or use federated build)
2. Start Eclipse and create HelloWorld project
3. Launch HelloWorld in debugger (Run->Debug)
4. Click Debug button and see crash

This crash does not occur if DRLVM is launched in -Xint mode. 


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

        

[jira] Closed: (HARMONY-2833) [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky closed HARMONY-2833.
--------------------------------------


No response, assuming ok.

> [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-2833
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2833
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows/ia32, Linux/ia32
>            Reporter: Ivan Popov
>            Assignee: Gregory Shimansky
>         Attachments: H-2833-Lazy-exception-creation.patch
>
>
> DRLVM (r489057) with JDWP agent crashed while debugging HelloWorld in Eclipse debugger.
> The crash is because of NULL pointer access inside JVMTI function GetObjectClass(), which is invoked for exception object passed to Exception callback during classlib initialization (i.e., before main() is invoked). 
> Here is stack trace from VC++ debugger:
> 	harmonyvm.dll!GetObjectClass(JNIEnv_External * jni_env=0x01173930, _jobject * obj=0x027773f0)  Line 1088	C++
> >	jdwp.dll!JNIEnv_::GetObjectClass(_jobject * obj=0x027773f0)  Line 854 + 0x12	C++
>  	jdwp.dll!jdwp::RequestManager::HandleException(_jvmtiEnv * jvmti=0x011757b0, JNIEnv_ * jni=0x01173930, _jobject * thread=0x027773f4, _jmethodID * method=0x02766ba4, __int64 location=10, _jobject * exception=0x027773f0, _jmethodID * catch_method=0x02766ba4, __int64 catch_location=24)  Line 932 + 0xc	C++
>  	harmonyvm.dll!jvmti_send_exception_event(_jobject * exn_object=0x027773f0, Method * method=0x02766ba4, __int64 location=10, Method * catch_method=0x02766ba4, __int64 catch_location=24)  Line 1288	C++
>  	harmonyvm.dll!jvmti_jit_exception_event_callback_call(ManagedObject * exn_object=0x00000000, JIT * jit=0x00f12730, Method * method=0x02766ba4, void * native_location=0x02e331d8, JIT * catch_jit=0x00f12730, Method * catch_method=0x02766ba4, void * native_catch_location=0x02e332d9)  Line 1385	C++
>  	harmonyvm.dll!exn_propagate_exception(StackIterator * si=0x0272c310, ManagedObject * * exn_obj=0x0012e57c, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 315	C++
>  	harmonyvm.dll!exn_throw_for_JIT(ManagedObject * exn_obj=0x00000000, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 425	C++
>  	harmonyvm.dll!exn_athrow(ManagedObject * exn_obj=0x0012e7f4, Class * exn_class=0x0012e7f4, Method * exn_constr=0x0012e7f4, unsigned char * exn_constr_args=0x01676339)  Line 445 + 0x1b	C++
>  	harmonyvm.dll!free(void * pBlock=0x41400000)  Line 103 + 0x5	C
>  	harmonyvm.dll!free(void * pBlock=)  Line 103 + 0x5	C
> To reproduce this crash:
> 1. Create DRLVM build and copy there jdwp and dt_socket libraries from jdktools build (or use federated build)
> 2. Start Eclipse and create HelloWorld project
> 3. Launch HelloWorld in debugger (Run->Debug)
> 4. Click Debug button and see crash
> This crash does not occur if DRLVM is launched in -Xint mode. 

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


[jira] Updated: (HARMONY-2833) [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2833?page=all ]

Gregory Shimansky updated HARMONY-2833:
---------------------------------------

    Patch Info: [Patch Available]
      Assignee: Gregory Shimansky

> [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-2833
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2833
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows/ia32, Linux/ia32
>            Reporter: Ivan Popov
>         Assigned To: Gregory Shimansky
>         Attachments: H-2833-Lazy-exception-creation.patch
>
>
> DRLVM (r489057) with JDWP agent crashed while debugging HelloWorld in Eclipse debugger.
> The crash is because of NULL pointer access inside JVMTI function GetObjectClass(), which is invoked for exception object passed to Exception callback during classlib initialization (i.e., before main() is invoked). 
> Here is stack trace from VC++ debugger:
> 	harmonyvm.dll!GetObjectClass(JNIEnv_External * jni_env=0x01173930, _jobject * obj=0x027773f0)  Line 1088	C++
> >	jdwp.dll!JNIEnv_::GetObjectClass(_jobject * obj=0x027773f0)  Line 854 + 0x12	C++
>  	jdwp.dll!jdwp::RequestManager::HandleException(_jvmtiEnv * jvmti=0x011757b0, JNIEnv_ * jni=0x01173930, _jobject * thread=0x027773f4, _jmethodID * method=0x02766ba4, __int64 location=10, _jobject * exception=0x027773f0, _jmethodID * catch_method=0x02766ba4, __int64 catch_location=24)  Line 932 + 0xc	C++
>  	harmonyvm.dll!jvmti_send_exception_event(_jobject * exn_object=0x027773f0, Method * method=0x02766ba4, __int64 location=10, Method * catch_method=0x02766ba4, __int64 catch_location=24)  Line 1288	C++
>  	harmonyvm.dll!jvmti_jit_exception_event_callback_call(ManagedObject * exn_object=0x00000000, JIT * jit=0x00f12730, Method * method=0x02766ba4, void * native_location=0x02e331d8, JIT * catch_jit=0x00f12730, Method * catch_method=0x02766ba4, void * native_catch_location=0x02e332d9)  Line 1385	C++
>  	harmonyvm.dll!exn_propagate_exception(StackIterator * si=0x0272c310, ManagedObject * * exn_obj=0x0012e57c, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 315	C++
>  	harmonyvm.dll!exn_throw_for_JIT(ManagedObject * exn_obj=0x00000000, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 425	C++
>  	harmonyvm.dll!exn_athrow(ManagedObject * exn_obj=0x0012e7f4, Class * exn_class=0x0012e7f4, Method * exn_constr=0x0012e7f4, unsigned char * exn_constr_args=0x01676339)  Line 445 + 0x1b	C++
>  	harmonyvm.dll!free(void * pBlock=0x41400000)  Line 103 + 0x5	C
>  	harmonyvm.dll!free(void * pBlock=)  Line 103 + 0x5	C
> To reproduce this crash:
> 1. Create DRLVM build and copy there jdwp and dt_socket libraries from jdktools build (or use federated build)
> 2. Start Eclipse and create HelloWorld project
> 3. Launch HelloWorld in debugger (Run->Debug)
> 4. Click Debug button and see crash
> This crash does not occur if DRLVM is launched in -Xint mode. 

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

        

[jira] Updated: (HARMONY-2833) [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object

Posted by "Eugene S. Ostrovsky (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2833?page=all ]

Eugene S. Ostrovsky updated HARMONY-2833:
-----------------------------------------

    Attachment: H-2833-Lazy-exception-creation.patch

Added patch:
  H-2833-Lazy-exception-creation.patch

Fixes lazy creation of exception object.

> [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-2833
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2833
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows/ia32, Linux/ia32
>            Reporter: Ivan Popov
>         Attachments: H-2833-Lazy-exception-creation.patch
>
>
> DRLVM (r489057) with JDWP agent crashed while debugging HelloWorld in Eclipse debugger.
> The crash is because of NULL pointer access inside JVMTI function GetObjectClass(), which is invoked for exception object passed to Exception callback during classlib initialization (i.e., before main() is invoked). 
> Here is stack trace from VC++ debugger:
> 	harmonyvm.dll!GetObjectClass(JNIEnv_External * jni_env=0x01173930, _jobject * obj=0x027773f0)  Line 1088	C++
> >	jdwp.dll!JNIEnv_::GetObjectClass(_jobject * obj=0x027773f0)  Line 854 + 0x12	C++
>  	jdwp.dll!jdwp::RequestManager::HandleException(_jvmtiEnv * jvmti=0x011757b0, JNIEnv_ * jni=0x01173930, _jobject * thread=0x027773f4, _jmethodID * method=0x02766ba4, __int64 location=10, _jobject * exception=0x027773f0, _jmethodID * catch_method=0x02766ba4, __int64 catch_location=24)  Line 932 + 0xc	C++
>  	harmonyvm.dll!jvmti_send_exception_event(_jobject * exn_object=0x027773f0, Method * method=0x02766ba4, __int64 location=10, Method * catch_method=0x02766ba4, __int64 catch_location=24)  Line 1288	C++
>  	harmonyvm.dll!jvmti_jit_exception_event_callback_call(ManagedObject * exn_object=0x00000000, JIT * jit=0x00f12730, Method * method=0x02766ba4, void * native_location=0x02e331d8, JIT * catch_jit=0x00f12730, Method * catch_method=0x02766ba4, void * native_catch_location=0x02e332d9)  Line 1385	C++
>  	harmonyvm.dll!exn_propagate_exception(StackIterator * si=0x0272c310, ManagedObject * * exn_obj=0x0012e57c, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 315	C++
>  	harmonyvm.dll!exn_throw_for_JIT(ManagedObject * exn_obj=0x00000000, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 425	C++
>  	harmonyvm.dll!exn_athrow(ManagedObject * exn_obj=0x0012e7f4, Class * exn_class=0x0012e7f4, Method * exn_constr=0x0012e7f4, unsigned char * exn_constr_args=0x01676339)  Line 445 + 0x1b	C++
>  	harmonyvm.dll!free(void * pBlock=0x41400000)  Line 103 + 0x5	C
>  	harmonyvm.dll!free(void * pBlock=)  Line 103 + 0x5	C
> To reproduce this crash:
> 1. Create DRLVM build and copy there jdwp and dt_socket libraries from jdktools build (or use federated build)
> 2. Start Eclipse and create HelloWorld project
> 3. Launch HelloWorld in debugger (Run->Debug)
> 4. Click Debug button and see crash
> This crash does not occur if DRLVM is launched in -Xint mode. 

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

        

[jira] Resolved: (HARMONY-2833) [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2833?page=all ]

Gregory Shimansky resolved HARMONY-2833.
----------------------------------------

    Resolution: Fixed

Patch applied at 489785. Please check that it was applied as expected.

> [drlvm][jvmti] NULL pointer access inside GetObjectClass() for exception object
> -------------------------------------------------------------------------------
>
>                 Key: HARMONY-2833
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2833
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows/ia32, Linux/ia32
>            Reporter: Ivan Popov
>         Assigned To: Gregory Shimansky
>         Attachments: H-2833-Lazy-exception-creation.patch
>
>
> DRLVM (r489057) with JDWP agent crashed while debugging HelloWorld in Eclipse debugger.
> The crash is because of NULL pointer access inside JVMTI function GetObjectClass(), which is invoked for exception object passed to Exception callback during classlib initialization (i.e., before main() is invoked). 
> Here is stack trace from VC++ debugger:
> 	harmonyvm.dll!GetObjectClass(JNIEnv_External * jni_env=0x01173930, _jobject * obj=0x027773f0)  Line 1088	C++
> >	jdwp.dll!JNIEnv_::GetObjectClass(_jobject * obj=0x027773f0)  Line 854 + 0x12	C++
>  	jdwp.dll!jdwp::RequestManager::HandleException(_jvmtiEnv * jvmti=0x011757b0, JNIEnv_ * jni=0x01173930, _jobject * thread=0x027773f4, _jmethodID * method=0x02766ba4, __int64 location=10, _jobject * exception=0x027773f0, _jmethodID * catch_method=0x02766ba4, __int64 catch_location=24)  Line 932 + 0xc	C++
>  	harmonyvm.dll!jvmti_send_exception_event(_jobject * exn_object=0x027773f0, Method * method=0x02766ba4, __int64 location=10, Method * catch_method=0x02766ba4, __int64 catch_location=24)  Line 1288	C++
>  	harmonyvm.dll!jvmti_jit_exception_event_callback_call(ManagedObject * exn_object=0x00000000, JIT * jit=0x00f12730, Method * method=0x02766ba4, void * native_location=0x02e331d8, JIT * catch_jit=0x00f12730, Method * catch_method=0x02766ba4, void * native_catch_location=0x02e332d9)  Line 1385	C++
>  	harmonyvm.dll!exn_propagate_exception(StackIterator * si=0x0272c310, ManagedObject * * exn_obj=0x0012e57c, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 315	C++
>  	harmonyvm.dll!exn_throw_for_JIT(ManagedObject * exn_obj=0x00000000, Class * exn_class=0x0118b4f8, Method * exn_constr=0x00000000, unsigned char * jit_exn_constr_args=0x00000000, jvalue * vm_exn_constr_args=0x00000000)  Line 425	C++
>  	harmonyvm.dll!exn_athrow(ManagedObject * exn_obj=0x0012e7f4, Class * exn_class=0x0012e7f4, Method * exn_constr=0x0012e7f4, unsigned char * exn_constr_args=0x01676339)  Line 445 + 0x1b	C++
>  	harmonyvm.dll!free(void * pBlock=0x41400000)  Line 103 + 0x5	C
>  	harmonyvm.dll!free(void * pBlock=)  Line 103 + 0x5	C
> To reproduce this crash:
> 1. Create DRLVM build and copy there jdwp and dt_socket libraries from jdktools build (or use federated build)
> 2. Start Eclipse and create HelloWorld project
> 3. Launch HelloWorld in debugger (Run->Debug)
> 4. Click Debug button and see crash
> This crash does not occur if DRLVM is launched in -Xint mode. 

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