harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-4333) [buildtest][vts] Some tests which use boundary values should expect that VM can throw StackOverflowError or OutOfMemoryError
Date Fri, 28 Dec 2007 13:33:44 GMT

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

Gregory Shimansky closed HARMONY-4333.
--------------------------------------


No response, assuming ok.

> [buildtest][vts] Some tests which use boundary values should expect that VM can throw
StackOverflowError or OutOfMemoryError
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4333
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4333
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>            Assignee: Gregory Shimansky
>         Attachments: limits.patch
>
>
> The following tests are incorrect
> 1) These tests check wide instructions and use boundary indexes
>       vm/jvms/instructions/arithm/iinc/iinc06/iinc0601/iinc0601.xml 
>       vm/jvms/instructions/branching/ret_w/ret_w01/ret_w0101/ret_w0101.xml 
>       vm/jvms/instructions/loadStore/aload/aload12/aload1201/aload1201.xml 
>       vm/jvms/instructions/loadStore/astore/astore03/astore0301/astore0301.xml 
>       vm/jvms/instructions/loadStore/astore/astore12/astore1201/astore1201.xml 
>       vm/jvms/instructions/loadStore/dload/dload12/dload1201/dload1201.xml 
>       vm/jvms/instructions/loadStore/dstore/dstore12/dstore1201/dstore1201.xml 
>       vm/jvms/instructions/loadStore/fload/fload12/fload1201/fload1201.xml 
>       vm/jvms/instructions/loadStore/fstore/fstore12/fstore1201/fstore1201.xml 
>       vm/jvms/instructions/loadStore/iload/iload12/iload1201/iload1201.xml 
>       vm/jvms/instructions/loadStore/istore/istore12/istore1201/istore1201.xml 
>       vm/jvms/instructions/loadStore/lload/lload12/lload1201/lload1201.xml 
>       vm/jvms/instructions/loadStore/lstore/lstore12/lstore1201/lstore1201.xml 
> 2) This testchecks the number of local variables limitation
>      vm/jvms/classFile/limitations/variables/variables01/variables01.xml 
> The tests use boundary values but thwy  do not expect that VM can throw StackOverflowError.
> RI throws this error and these test fail.
> These tests should be redesigned to expect SOE.
> For example, see source code:   istore1201.j
> ---------------------
> ;
> ; standard main function
> .method public static main([Ljava/lang/String;)V
>   .limit stack 2
>   .limit locals 1
>   .catch java/lang/StackOverflowError from L1 to L2 using L2     <<<<<<<<<<<<<
 add line
> L1:                                                                                 
                         <<<<<<<<<<<<< add line
>   new org/apache/harmony/vts/test/vm/jvms/instructions/loadStore/istore/istore12/istore1201/istore1201p
>   dup
>   invokespecial org/apache/harmony/vts/test/vm/jvms/instructions/loadStore/istore/istore12/istore1201/istore1201p/<init>()V
>   aload_0
>   invokevirtual org/apache/harmony/vts/test/vm/jvms/instructions/loadStore/istore/istore12/istore1201/istore1201p/test([Ljava/lang/String;)I
>   goto L3                                                                           
                      <<<<<<<<<<<<<  add line
> L2:                                                                                 
                          <<<<<<<<<<<<<  add line
>   pop                                                                               
                         <<<<<<<<<<<<<  add line
>   sipush 106                                                                        
                   <<<<<<<<<<<<<  add line
> L3:                                                                                 
                          <<<<<<<<<<<<<  add line
>   invokestatic java/lang/System/exit(I)V
>   return
> .end method
> ---------------------------
> 3) There is additional issue in the test
>      vm/jvms/instructions/reftypes/newarray/newarray08/newarray0801/newarray0801.xml
> It creates large array and does not expect that VM can throw OutOfMemoryError.
> See source code:
> --------------newarray0801.j-----------
> ; test method
> .method public test([Ljava/lang/String;)I
>    .limit stack 2
>    .limit locals 2
>   .catch java/lang/OutOfMemoryError from L1 to L2 using L3      <<<<<
add line
> L1:                                                                                 
                         <<<<< add line
>    ldc 50555555 ; push 50555555 into the stack
>    newarray boolean 
> L2:                                                                                 
                          <<<<< add line
>    arraylength
>    ldc 50555555
>    if_icmpne Fail
>    ; test passed
>    sipush 104
>    ireturn
> Fail:
>    ; test failed
>    sipush 105
>    ireturn
> L3:                                                             <<<<<
add line
>    sipush 104                                           <<<<< add line
>    ireturn                                                    <<<<< add
line
> .end method
> ------------------

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


Mime
View raw message