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

[jira] Created: (HARMONY-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

[drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
------------------------------------------------------------------------------

                 Key: HARMONY-1802
                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
             Project: Harmony
          Issue Type: Bug
            Reporter: Mikhail Fursov


Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
compile this code:

public class Test {

public static void main(String[] args) {
foo(null);
}
static void foo(X x) {}
}
class X {
}


delete X.class file and run the test with -Xem:opt cmdline option.

The same problem occurs if class X is exception handler parameter.


-- 
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] Commented: (HARMONY-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1802?page=comments#action_12441423 ] 
            
George Timoshenko commented on HARMONY-1802:
--------------------------------------------

The testcase for the problem of unresolvable exception types.

Scenario is the same:
- compile
- remove CustomE
- run with '-Xem opt' key

=====
public class TestExc { 

public static void main(String[] args) { 
    try {
        if (false) {
            CustomE e = new CustomE();
            throw e;
        }
    } catch (CustomE e) {
        System.out.println(e.getMessage());
    }
} 
} 

class CustomE extends Exception {}

=====

> [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-1802
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Mikhail Fursov
>
> Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
> compile this code:
> public class Test {
> public static void main(String[] args) {
> foo(null);
> }
> static void foo(X x) {}
> }
> class X {
> }
> delete X.class file and run the test with -Xem:opt cmdline option.
> The same problem occurs if class X is exception handler parameter.

-- 
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] Commented: (HARMONY-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1802?page=comments#action_12441381 ] 
            
George Timoshenko commented on HARMONY-1802:
--------------------------------------------

Mikhail is right. 

return type usage appeares during parsing bytecode. There is a way that alows to generate throwLinkingException helper call at the point of the usage of problem return type (if it is). This functionality needs an opcode (of usage) and constant pool index of the return value class (or any other item that fails to be resolved at the point).

But the input parameters are processed in the JavaLabelPrepass constructor, before bytecode parsing is started. We can not get the constant pool index of a problem class at that point. The only way for the case is to return compilation failure.

> [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-1802
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Mikhail Fursov
>
> Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
> compile this code:
> public class Test {
> public static void main(String[] args) {
> foo(null);
> }
> static void foo(X x) {}
> }
> class X {
> }
> delete X.class file and run the test with -Xem:opt cmdline option.
> The same problem occurs if class X is exception handler parameter.

-- 
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] Commented: (HARMONY-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1802?page=comments#action_12441126 ] 
            
Alexey Varlamov commented on HARMONY-1802:
------------------------------------------

What about return types and exceptions, there may be similar problems?

> [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-1802
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Mikhail Fursov
>
> Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
> compile this code:
> public class Test {
> public static void main(String[] args) {
> foo(null);
> }
> static void foo(X x) {}
> }
> class X {
> }
> delete X.class file and run the test with -Xem:opt cmdline option.
> The same problem occurs if class X is exception handler parameter.

-- 
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] Commented: (HARMONY-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

Posted by "George Timoshenko (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1802?page=comments#action_12441694 ] 
            
George Timoshenko commented on HARMONY-1802:
--------------------------------------------

I am sorry. The previous testcase is wrong.
Here is the good one:

====
public class TestExc { 

public static void main(String[] args) { 
    X x = new X();
    x.foo(false);
} 

} 


class X {

public void foo(boolean a) {
    try {
        if (a) {
            CustomE e = new CustomE();
            throw e;
        }
    } catch (CustomE e) {
        System.out.println(e.getMessage());
    }
}
}

class CustomE extends Exception {}

======

To reproduce the bug with exception type one should build debug version of jitrino. And not forget to set '-Dvm.use_verifier=0' key.
Failure will be the following:

Assertion failed at line 305 of file /export/users2/gatimosh/HARMONY_SVN/trunk/working_vm/vm/jitrino/src/translator/java/JavaLabelPrepass.cpp


> [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-1802
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Mikhail Fursov
>
> Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
> compile this code:
> public class Test {
> public static void main(String[] args) {
> foo(null);
> }
> static void foo(X x) {}
> }
> class X {
> }
> delete X.class file and run the test with -Xem:opt cmdline option.
> The same problem occurs if class X is exception handler parameter.

-- 
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] Commented: (HARMONY-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-1802?page=comments#action_12441128 ] 
            
Mikhail Fursov commented on HARMONY-1802:
-----------------------------------------

AFAIK there is no problem with return types.


> [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-1802
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Mikhail Fursov
>
> Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
> compile this code:
> public class Test {
> public static void main(String[] args) {
> foo(null);
> }
> static void foo(X x) {}
> }
> class X {
> }
> delete X.class file and run the test with -Xem:opt cmdline option.
> The same problem occurs if class X is exception handler parameter.

-- 
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-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1802?page=all ]

Geir Magnusson Jr resolved HARMONY-1802.
----------------------------------------

    Resolution: Fixed

r463919

Ubuntu 6 - smoke, c-unit, ~kernel

> [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-1802
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Mikhail Fursov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1802.diff
>
>
> Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
> compile this code:
> public class Test {
> public static void main(String[] args) {
> foo(null);
> }
> static void foo(X x) {}
> }
> class X {
> }
> delete X.class file and run the test with -Xem:opt cmdline option.
> The same problem occurs if class X is exception handler parameter.

-- 
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-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

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

George Timoshenko updated HARMONY-1802:
---------------------------------------

    Attachment: HARMONY-1802.diff

Please consider the cumulative fix for the both:
- problem of unresolvable exception type
......(respective LinkingException helper call is generated instead of the methods body)
- problem of unresolvable parameter type
......(in prepass/translator constructor the problem type is replaced by NullObjectType. Necessary exception is thrown at the usage point of a parameter)

> [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-1802
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Mikhail Fursov
>         Attachments: HARMONY-1802.diff
>
>
> Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
> compile this code:
> public class Test {
> public static void main(String[] args) {
> foo(null);
> }
> static void foo(X x) {}
> }
> class X {
> }
> delete X.class file and run the test with -Xem:opt cmdline option.
> The same problem occurs if class X is exception handler parameter.

-- 
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] Assigned: (HARMONY-1802) [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly

Posted by "Geir Magnusson Jr (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-1802?page=all ]

Geir Magnusson Jr reassigned HARMONY-1802:
------------------------------------------

    Assignee: Geir Magnusson Jr

> [drlvm][jit] Jitrino.OPT does not handle unresolved method parameters properly
> ------------------------------------------------------------------------------
>
>                 Key: HARMONY-1802
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1802
>             Project: Harmony
>          Issue Type: Bug
>            Reporter: Mikhail Fursov
>         Assigned To: Geir Magnusson Jr
>         Attachments: HARMONY-1802.diff
>
>
> Jitrino.OPT does not handle unresolved method parameters properly. Here is the testcase.
> compile this code:
> public class Test {
> public static void main(String[] args) {
> foo(null);
> }
> static void foo(X x) {}
> }
> class X {
> }
> delete X.class file and run the test with -Xem:opt cmdline option.
> The same problem occurs if class X is exception handler parameter.

-- 
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