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] Commented: (HARMONY-5040) [drlvm][classloader] Java field ordering must be preserved
Date Tue, 13 Nov 2007 11:04:50 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-5040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542108
] 

Gregory Shimansky commented on HARMONY-5040:
--------------------------------------------

With this patch I get assertion failures for JVMTI tests both on windows and linux x86_64.
Here is stack trace:

    [junit] java: /nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/vmcore/src/class_support/Prepare.cpp:286:
void Class::assign_offsets_to_static_fields(Field**, bool): Assertion `(m_static_data_size%8)==0'
failed.
    [junit] SIGABRT in VM code.
    [junit] Stack trace:
    [junit]   0: raise (??:-1)
    [junit]   1: abort (??:-1)
    [junit]   2: ?? (??:-1)
    [junit]   3: ?? (??:-1)
    [junit]   4: ?? (??:-1)
    [junit]   5: ?? (??:-1)
    [junit]   6: __fxprintf (??:-1)
    [junit]   7: asprintf (??:-1)
    [junit]   8: ?? (??:-1)
    [junit]   9: ?? (??:-1)
    [junit]  10: ?? (??:-1)
    [junit]  11: ?? (??:-1)
    [junit]  12: ?? (??:-1)
    [junit]  13: __assert_fail (??:-1)
    [junit]  14: ?? (??:-1)
    [junit]  15: ?? (??:-1)
    [junit]  16: ?? (??:-1)
    [junit]  17: sizeof_field_type (/nfs/ims/proj/drl/mrt2/users/gregory/em64t/trunk/working_vm/vm/vmcore/src/class_support/Prepare.cpp:69)
    [junit]  18: java/lang/ClassLoader.defineClass0(Ljava/lang/String;[BII)Ljava/lang/Class;
(ClassLoader.java:-2)
    [junit]  19: java/lang/ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;
(ClassLoader.java:438)
    [junit]  20: java/security/SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;
(SecureClassLoader.java:70)
    [junit]  21: java/net/URLClassLoader.access$3(Ljava/net/URLClassLoader;Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;
(URLClassLoader.java:1)
    [junit]  22: java/net/URLClassLoader$URLJarHandler.createClass(Ljava/util/jar/JarEntry;Ljava/util/jar/Manifest;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Class;
(URLClassLoader.java:437)
    [junit]  23: java/net/URLClassLoader$URLJarHandler.findClass(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Class;
(URLClassLoader.java:367)
    [junit]  24: java/net/URLClassLoader.findClassImpl(Ljava/lang/String;)Ljava/lang/Class;
(URLClassLoader.java:1193)
    [junit]  25: java/net/URLClassLoader$4.run()Ljava/lang/Class; (URLClassLoader.java:888)
    [junit]  26: java/net/URLClassLoader$4.run()Ljava/lang/Object; (URLClassLoader.java:1)
    [junit]  27: java/security/AccessController.doPrivilegedImpl(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
(AccessController.java:173)
    [junit]  28: java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;
(AccessController.java:64)
    [junit]  29: java/net/URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class; (URLClassLoader.java:885)
    [junit]  30: java/lang/ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class; (ClassLoader.java:575)
    [junit]  31: java/lang/ClassLoader$SystemClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;
(ClassLoader.java:963)
    [junit]  32: java/lang/ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; (ClassLoader.java:319)
    [junit]  33: org/apache/tools/ant/Project.<clinit>()V (Project.java:119)
    [junit]  34: org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.main([Ljava/lang/String;)V
(JUnitTestRunner.java:505)
    [junit] <end of stack trace>


> [drlvm][classloader] Java field ordering must be preserved
> ----------------------------------------------------------
>
>                 Key: HARMONY-5040
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5040
>             Project: Harmony
>          Issue Type: Improvement
>          Components: DRLVM
>            Reporter: Aleksey Shipilev
>            Assignee: Gregory Shimansky
>         Attachments: fo-stable-1.patch, fo-stable-1.patch, fo-stable-1.patch
>
>
> Current implementation of class support in Harmony sorts the class fields decrementally
by size to avoid misalignment. However, it's done with quicksort which is known to be unstable
(e.g. there are no guarantees that order of elements with equal keys will not be changed).
That lead to shaking Java field order which could be optimized to achieve the spatial locality.

> Proposed patch changes the sorting algorithm to bubblesort, which is known to be stable.
That's performance-safe since average field count is not high.

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