You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Vera Petrashkova (JIRA)" <ji...@apache.org> on 2007/07/03 09:21:04 UTC

[jira] Created: (HARMONY-4315) [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data

[buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data
------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4315
                 URL: https://issues.apache.org/jira/browse/HARMONY-4315
             Project: Harmony
          Issue Type: Bug
          Components: build - test - ci
            Reporter: Vera Petrashkova
         Attachments: GetClassSignature.patch

Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml
checks that  method 
GetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char**
generic_ptr)

returns JVMTI_ERROR_INVALID_CLASS when klass is not a class object or the class 
has been unloaded.

It invokes method with jthread object and expects that VM returns error code.

But then this test tries to output information about "signature of used wrong 
class".
See GetClassSignature0102.cpp source code:
----------------------
void JNICALL callbackException(prms_EXCPT)
{
    check_EXCPT;

    if (flag) return;

    jvmtiError result;
    jclass myclass = NULL;
    char* signature;
    char* generic;

    /*
     * Function separate all other exceptions in all other method
     */
    if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
                "special_method", DEBUG_OUT)) return;

    result = jvmti_env->GetMethodDeclaringClass(method, &myclass);
    if (DEBUG_OUT)
    {
        fprintf(stderr, "\tnative: GetMethodDeclaringClass result = %d (must be zero) \n", result);
        fprintf(stderr, "\tnative: method is %p \n", method);
        fprintf(stderr, "\tnative: myclass is %p \n", myclass);
    }
    if (result != JVMTI_ERROR_NONE) return;

    flag = true;
    util = true;

    result = jvmti_env->GetClassSignature((jclass)thread, &signature, &generic);
    fprintf(stderr, "\tnative: GetClassSignature result = %d (must be JVMTI_ERROR_INVALID_CLASS (21)) \n", result);
    fprintf(stderr, "\tnative: classes ptr is %p \n", myclass); <<<<<<<<<<<<
    fprintf(stderr, "\tnative: signature is %s \n", signature); <<<<<<<<<<<<
    fprintf(stderr, "\tnative: generic is %s \n", generic);     <<<<<<<<<<<
    fflush(stderr);

    if (result != JVMTI_ERROR_INVALID_CLASS) return;
    test = true;
}
-----------------------

VM returns correct error code but then it crashes on reporting wrong datas.
As the result this test fails even if it actually passes.
These useless reports should be removed.


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


[jira] Assigned: (HARMONY-4315) [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data

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

Stepan Mishura reassigned HARMONY-4315:
---------------------------------------

    Assignee: Stepan Mishura

> [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4315
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4315
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>            Assignee: Stepan Mishura
>         Attachments: GetClassSignature.patch
>
>
> Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml
> checks that  method 
> GetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char**
> generic_ptr)
> returns JVMTI_ERROR_INVALID_CLASS when klass is not a class object or the class 
> has been unloaded.
> It invokes method with jthread object and expects that VM returns error code.
> But then this test tries to output information about "signature of used wrong 
> class".
> See GetClassSignature0102.cpp source code:
> ----------------------
> void JNICALL callbackException(prms_EXCPT)
> {
>     check_EXCPT;
>     if (flag) return;
>     jvmtiError result;
>     jclass myclass = NULL;
>     char* signature;
>     char* generic;
>     /*
>      * Function separate all other exceptions in all other method
>      */
>     if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
>                 "special_method", DEBUG_OUT)) return;
>     result = jvmti_env->GetMethodDeclaringClass(method, &myclass);
>     if (DEBUG_OUT)
>     {
>         fprintf(stderr, "\tnative: GetMethodDeclaringClass result = %d (must be zero) \n", result);
>         fprintf(stderr, "\tnative: method is %p \n", method);
>         fprintf(stderr, "\tnative: myclass is %p \n", myclass);
>     }
>     if (result != JVMTI_ERROR_NONE) return;
>     flag = true;
>     util = true;
>     result = jvmti_env->GetClassSignature((jclass)thread, &signature, &generic);
>     fprintf(stderr, "\tnative: GetClassSignature result = %d (must be JVMTI_ERROR_INVALID_CLASS (21)) \n", result);
>     fprintf(stderr, "\tnative: classes ptr is %p \n", myclass); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: signature is %s \n", signature); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: generic is %s \n", generic);     <<<<<<<<<<<
>     fflush(stderr);
>     if (result != JVMTI_ERROR_INVALID_CLASS) return;
>     test = true;
> }
> -----------------------
> VM returns correct error code but then it crashes on reporting wrong datas.
> As the result this test fails even if it actually passes.
> These useless reports should be removed.

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


[jira] Updated: (HARMONY-4315) [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data

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

Vera Petrashkova updated HARMONY-4315:
--------------------------------------

    Attachment: GetClassSignature.patch

> [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4315
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4315
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>         Attachments: GetClassSignature.patch
>
>
> Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml
> checks that  method 
> GetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char**
> generic_ptr)
> returns JVMTI_ERROR_INVALID_CLASS when klass is not a class object or the class 
> has been unloaded.
> It invokes method with jthread object and expects that VM returns error code.
> But then this test tries to output information about "signature of used wrong 
> class".
> See GetClassSignature0102.cpp source code:
> ----------------------
> void JNICALL callbackException(prms_EXCPT)
> {
>     check_EXCPT;
>     if (flag) return;
>     jvmtiError result;
>     jclass myclass = NULL;
>     char* signature;
>     char* generic;
>     /*
>      * Function separate all other exceptions in all other method
>      */
>     if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
>                 "special_method", DEBUG_OUT)) return;
>     result = jvmti_env->GetMethodDeclaringClass(method, &myclass);
>     if (DEBUG_OUT)
>     {
>         fprintf(stderr, "\tnative: GetMethodDeclaringClass result = %d (must be zero) \n", result);
>         fprintf(stderr, "\tnative: method is %p \n", method);
>         fprintf(stderr, "\tnative: myclass is %p \n", myclass);
>     }
>     if (result != JVMTI_ERROR_NONE) return;
>     flag = true;
>     util = true;
>     result = jvmti_env->GetClassSignature((jclass)thread, &signature, &generic);
>     fprintf(stderr, "\tnative: GetClassSignature result = %d (must be JVMTI_ERROR_INVALID_CLASS (21)) \n", result);
>     fprintf(stderr, "\tnative: classes ptr is %p \n", myclass); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: signature is %s \n", signature); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: generic is %s \n", generic);     <<<<<<<<<<<
>     fflush(stderr);
>     if (result != JVMTI_ERROR_INVALID_CLASS) return;
>     test = true;
> }
> -----------------------
> VM returns correct error code but then it crashes on reporting wrong datas.
> As the result this test fails even if it actually passes.
> These useless reports should be removed.

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


[jira] Commented: (HARMONY-4315) [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557226#action_12557226 ] 

Stepan Mishura commented on HARMONY-4315:
-----------------------------------------

The patch applied at r610335.

> [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4315
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4315
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>            Assignee: Stepan Mishura
>         Attachments: GetClassSignature.patch, H4315.patch
>
>
> Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml
> checks that  method 
> GetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char**
> generic_ptr)
> returns JVMTI_ERROR_INVALID_CLASS when klass is not a class object or the class 
> has been unloaded.
> It invokes method with jthread object and expects that VM returns error code.
> But then this test tries to output information about "signature of used wrong 
> class".
> See GetClassSignature0102.cpp source code:
> ----------------------
> void JNICALL callbackException(prms_EXCPT)
> {
>     check_EXCPT;
>     if (flag) return;
>     jvmtiError result;
>     jclass myclass = NULL;
>     char* signature;
>     char* generic;
>     /*
>      * Function separate all other exceptions in all other method
>      */
>     if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
>                 "special_method", DEBUG_OUT)) return;
>     result = jvmti_env->GetMethodDeclaringClass(method, &myclass);
>     if (DEBUG_OUT)
>     {
>         fprintf(stderr, "\tnative: GetMethodDeclaringClass result = %d (must be zero) \n", result);
>         fprintf(stderr, "\tnative: method is %p \n", method);
>         fprintf(stderr, "\tnative: myclass is %p \n", myclass);
>     }
>     if (result != JVMTI_ERROR_NONE) return;
>     flag = true;
>     util = true;
>     result = jvmti_env->GetClassSignature((jclass)thread, &signature, &generic);
>     fprintf(stderr, "\tnative: GetClassSignature result = %d (must be JVMTI_ERROR_INVALID_CLASS (21)) \n", result);
>     fprintf(stderr, "\tnative: classes ptr is %p \n", myclass); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: signature is %s \n", signature); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: generic is %s \n", generic);     <<<<<<<<<<<
>     fflush(stderr);
>     if (result != JVMTI_ERROR_INVALID_CLASS) return;
>     test = true;
> }
> -----------------------
> VM returns correct error code but then it crashes on reporting wrong datas.
> As the result this test fails even if it actually passes.
> These useless reports should be removed.

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


[jira] Commented: (HARMONY-4315) [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557200#action_12557200 ] 

Stepan Mishura commented on HARMONY-4315:
-----------------------------------------

Pavel,

I verified the test on Linux only. As the test passed for me so I assumed that the issue was fixed and didn't apply the patch to the test (BTW, it has no ASF granted license). 

Do you think that the patch should be applied and the crash should be ignored?

Thanks,
Stepan.

> [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4315
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4315
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>            Assignee: Stepan Mishura
>         Attachments: GetClassSignature.patch
>
>
> Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml
> checks that  method 
> GetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char**
> generic_ptr)
> returns JVMTI_ERROR_INVALID_CLASS when klass is not a class object or the class 
> has been unloaded.
> It invokes method with jthread object and expects that VM returns error code.
> But then this test tries to output information about "signature of used wrong 
> class".
> See GetClassSignature0102.cpp source code:
> ----------------------
> void JNICALL callbackException(prms_EXCPT)
> {
>     check_EXCPT;
>     if (flag) return;
>     jvmtiError result;
>     jclass myclass = NULL;
>     char* signature;
>     char* generic;
>     /*
>      * Function separate all other exceptions in all other method
>      */
>     if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
>                 "special_method", DEBUG_OUT)) return;
>     result = jvmti_env->GetMethodDeclaringClass(method, &myclass);
>     if (DEBUG_OUT)
>     {
>         fprintf(stderr, "\tnative: GetMethodDeclaringClass result = %d (must be zero) \n", result);
>         fprintf(stderr, "\tnative: method is %p \n", method);
>         fprintf(stderr, "\tnative: myclass is %p \n", myclass);
>     }
>     if (result != JVMTI_ERROR_NONE) return;
>     flag = true;
>     util = true;
>     result = jvmti_env->GetClassSignature((jclass)thread, &signature, &generic);
>     fprintf(stderr, "\tnative: GetClassSignature result = %d (must be JVMTI_ERROR_INVALID_CLASS (21)) \n", result);
>     fprintf(stderr, "\tnative: classes ptr is %p \n", myclass); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: signature is %s \n", signature); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: generic is %s \n", generic);     <<<<<<<<<<<
>     fflush(stderr);
>     if (result != JVMTI_ERROR_INVALID_CLASS) return;
>     test = true;
> }
> -----------------------
> VM returns correct error code but then it crashes on reporting wrong datas.
> As the result this test fails even if it actually passes.
> These useless reports should be removed.

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


[jira] Commented: (HARMONY-4315) [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557147#action_12557147 ] 

Pavel Pervov commented on HARMONY-4315:
---------------------------------------

Stepan,

it looks like the patch was not applied to the test itself. It now crashes on Windows x86.

> [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4315
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4315
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>            Assignee: Stepan Mishura
>         Attachments: GetClassSignature.patch
>
>
> Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml
> checks that  method 
> GetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char**
> generic_ptr)
> returns JVMTI_ERROR_INVALID_CLASS when klass is not a class object or the class 
> has been unloaded.
> It invokes method with jthread object and expects that VM returns error code.
> But then this test tries to output information about "signature of used wrong 
> class".
> See GetClassSignature0102.cpp source code:
> ----------------------
> void JNICALL callbackException(prms_EXCPT)
> {
>     check_EXCPT;
>     if (flag) return;
>     jvmtiError result;
>     jclass myclass = NULL;
>     char* signature;
>     char* generic;
>     /*
>      * Function separate all other exceptions in all other method
>      */
>     if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
>                 "special_method", DEBUG_OUT)) return;
>     result = jvmti_env->GetMethodDeclaringClass(method, &myclass);
>     if (DEBUG_OUT)
>     {
>         fprintf(stderr, "\tnative: GetMethodDeclaringClass result = %d (must be zero) \n", result);
>         fprintf(stderr, "\tnative: method is %p \n", method);
>         fprintf(stderr, "\tnative: myclass is %p \n", myclass);
>     }
>     if (result != JVMTI_ERROR_NONE) return;
>     flag = true;
>     util = true;
>     result = jvmti_env->GetClassSignature((jclass)thread, &signature, &generic);
>     fprintf(stderr, "\tnative: GetClassSignature result = %d (must be JVMTI_ERROR_INVALID_CLASS (21)) \n", result);
>     fprintf(stderr, "\tnative: classes ptr is %p \n", myclass); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: signature is %s \n", signature); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: generic is %s \n", generic);     <<<<<<<<<<<
>     fflush(stderr);
>     if (result != JVMTI_ERROR_INVALID_CLASS) return;
>     test = true;
> }
> -----------------------
> VM returns correct error code but then it crashes on reporting wrong datas.
> As the result this test fails even if it actually passes.
> These useless reports should be removed.

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


[jira] Resolved: (HARMONY-4315) [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data

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

Stepan Mishura resolved HARMONY-4315.
-------------------------------------

    Resolution: Fixed

I've removed the test from the exclude list. It passes for me on:
svn = r606783, (Dec 25 2007), Linux/ia32/gcc 3.3.3, debug build

> [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4315
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4315
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>            Assignee: Stepan Mishura
>         Attachments: GetClassSignature.patch
>
>
> Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml
> checks that  method 
> GetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char**
> generic_ptr)
> returns JVMTI_ERROR_INVALID_CLASS when klass is not a class object or the class 
> has been unloaded.
> It invokes method with jthread object and expects that VM returns error code.
> But then this test tries to output information about "signature of used wrong 
> class".
> See GetClassSignature0102.cpp source code:
> ----------------------
> void JNICALL callbackException(prms_EXCPT)
> {
>     check_EXCPT;
>     if (flag) return;
>     jvmtiError result;
>     jclass myclass = NULL;
>     char* signature;
>     char* generic;
>     /*
>      * Function separate all other exceptions in all other method
>      */
>     if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
>                 "special_method", DEBUG_OUT)) return;
>     result = jvmti_env->GetMethodDeclaringClass(method, &myclass);
>     if (DEBUG_OUT)
>     {
>         fprintf(stderr, "\tnative: GetMethodDeclaringClass result = %d (must be zero) \n", result);
>         fprintf(stderr, "\tnative: method is %p \n", method);
>         fprintf(stderr, "\tnative: myclass is %p \n", myclass);
>     }
>     if (result != JVMTI_ERROR_NONE) return;
>     flag = true;
>     util = true;
>     result = jvmti_env->GetClassSignature((jclass)thread, &signature, &generic);
>     fprintf(stderr, "\tnative: GetClassSignature result = %d (must be JVMTI_ERROR_INVALID_CLASS (21)) \n", result);
>     fprintf(stderr, "\tnative: classes ptr is %p \n", myclass); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: signature is %s \n", signature); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: generic is %s \n", generic);     <<<<<<<<<<<
>     fflush(stderr);
>     if (result != JVMTI_ERROR_INVALID_CLASS) return;
>     test = true;
> }
> -----------------------
> VM returns correct error code but then it crashes on reporting wrong datas.
> As the result this test fails even if it actually passes.
> These useless reports should be removed.

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


[jira] Updated: (HARMONY-4315) [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data

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

Pavel Pervov updated HARMONY-4315:
----------------------------------

    Attachment: H4315.patch

Here is the patch with ASF granted license.

The crash is the bug in test which tries to print out uninitialized values.

> [buildtest][vts] Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml crashes when it tries to print wrong data
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4315
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4315
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>            Assignee: Stepan Mishura
>         Attachments: GetClassSignature.patch, H4315.patch
>
>
> Test vm/jvmti/funcs/GetClassSignature/GetClassSignature0102/GetClassSignature0102.xml
> checks that  method 
> GetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char**
> generic_ptr)
> returns JVMTI_ERROR_INVALID_CLASS when klass is not a class object or the class 
> has been unloaded.
> It invokes method with jthread object and expects that VM returns error code.
> But then this test tries to output information about "signature of used wrong 
> class".
> See GetClassSignature0102.cpp source code:
> ----------------------
> void JNICALL callbackException(prms_EXCPT)
> {
>     check_EXCPT;
>     if (flag) return;
>     jvmtiError result;
>     jclass myclass = NULL;
>     char* signature;
>     char* generic;
>     /*
>      * Function separate all other exceptions in all other method
>      */
>     if (!check_phase_and_method_debug(jvmti_env, method, SPP_LIVE_ONLY,
>                 "special_method", DEBUG_OUT)) return;
>     result = jvmti_env->GetMethodDeclaringClass(method, &myclass);
>     if (DEBUG_OUT)
>     {
>         fprintf(stderr, "\tnative: GetMethodDeclaringClass result = %d (must be zero) \n", result);
>         fprintf(stderr, "\tnative: method is %p \n", method);
>         fprintf(stderr, "\tnative: myclass is %p \n", myclass);
>     }
>     if (result != JVMTI_ERROR_NONE) return;
>     flag = true;
>     util = true;
>     result = jvmti_env->GetClassSignature((jclass)thread, &signature, &generic);
>     fprintf(stderr, "\tnative: GetClassSignature result = %d (must be JVMTI_ERROR_INVALID_CLASS (21)) \n", result);
>     fprintf(stderr, "\tnative: classes ptr is %p \n", myclass); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: signature is %s \n", signature); <<<<<<<<<<<<
>     fprintf(stderr, "\tnative: generic is %s \n", generic);     <<<<<<<<<<<
>     fflush(stderr);
>     if (result != JVMTI_ERROR_INVALID_CLASS) return;
>     test = true;
> }
> -----------------------
> VM returns correct error code but then it crashes on reporting wrong datas.
> As the result this test fails even if it actually passes.
> These useless reports should be removed.

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