harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-5067) [drlvm][jit] Incorrect string comparison
Date Tue, 06 Nov 2007 11:54:50 GMT

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

Alexey Varlamov reassigned HARMONY-5067:
----------------------------------------

    Assignee: Alexey Varlamov

> [drlvm][jit] Incorrect string comparison
> ----------------------------------------
>
>                 Key: HARMONY-5067
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5067
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: windows32
>            Reporter: Evgeniya Maenkova
>            Assignee: Alexey Varlamov
>         Attachments: HARMONY-5067_fix_and_regtest.patch, Test.java, Test_2.java, Test_2.java
>
>
> The test mentioned below produces incorrect resuls starting from some iteration(r591816),
works fine with interpreter. This bug isn;t reproducible on, say, r572955.
> C:\ecl_311_ws\SPECjvm2007\bin1>C:\Harmony_to_run\trunk\working_vm\build\win_ia32_msvc_release\deploy\jdk\jre\bin\java
-cp . Test
> CRASH30 30(loop: 199751) 
> C:\ecl_311_ws\SPECjvm2007\bin1>C:\Harmony_to_run\trunk\working_vm\build\win_ia32_msvc_release\deploy\jdk\jre\bin\java
-Xint Test 
> C:\ecl_311_ws\SPECjvm2007\bin1>
>  Test:
> import java.util.Arrays;
>  
> public class Test {
>             public static class MyObj implements Comparable<MyObj> {
>                         String dir;
>                         String name;
>                         public MyObj(String name, String dir) {
>                                     this.dir = dir;
>                                     this.name = name;
>                         }
>                         
>                         public int compareTo(MyObj other) {                         
          
>                     String otherD = other.dir;                
>                     if (dir != otherD) {
>                         int c = dir.compareTo(otherD);
>                         if (c != 0)
>                             return c;
>                     }
>                     return name.compareTo(other.name);
>                 }
>  
>             }
>             
>             static MyObj[] arr = new MyObj[] {              
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),            
>                         new MyObj("WriteAbortedException.class","java\\io"),
>                         new MyObj("Writer.class","java\\io"),
>                         new MyObj("AbstractMethodError.class","java\\lang"),
>         new MyObj("AbstractStringBuilder.class","java\\lang"),
>         new MyObj("Appendable.class","java\\lang"),        
>         new MyObj("VirtualMachineError.class","java\\lang"),
>         new MyObj("Void.class","java\\lang"),
>         new MyObj("ref","java\\lang"),
>         new MyObj("reflect","java\\lang"),
>         new MyObj("ReferenceQueue.class","java\\lang\\ref"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         new MyObj("AnnotatedElement.class","java\\lang\\reflect"),
>         new MyObj("GenericArrayType.class","java\\lang\\reflect"),
>         new MyObj("GenericDeclaration.class","java\\lang\\reflect"),
>         
>             };
>             
>  
>             
>             public static void main(String[] args) {
>                         for (int i = 0; i <1000000; i ++) {
>                          int from = -Arrays.binarySearch(arr,
>                 new MyObj(String.valueOf(Character.MIN_VALUE), "java\\lang")) - 1;
>                         int to = -Arrays.binarySearch(arr,
>                 new MyObj(String.valueOf(Character.MAX_VALUE), "java\\lang")) - 1;
>                          if (to != 37 || from !=30) { 
>                             System.out.println("CRASH" + from + " " + to +  "(loop: "
+ i + ")");
>                             System.exit(0);
>                          }   
>                }       
>                         
>             }
> }

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