Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 47270 invoked from network); 28 Jun 2007 14:29:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Jun 2007 14:29:48 -0000 Received: (qmail 85023 invoked by uid 500); 28 Jun 2007 14:29:50 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 85006 invoked by uid 500); 28 Jun 2007 14:29:50 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 84992 invoked by uid 99); 28 Jun 2007 14:29:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2007 07:29:50 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Jun 2007 07:29:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6683F7141DC for ; Thu, 28 Jun 2007 07:29:26 -0700 (PDT) Message-ID: <26590582.1183040966416.JavaMail.jira@brutus> Date: Thu, 28 Jun 2007 07:29:26 -0700 (PDT) From: "Gregory Shimansky (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4282) [drlvm][vmcore] obj_info agreement between VM and GC In-Reply-To: <23666863.1182844902607.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gregory Shimansky updated HARMONY-4282: --------------------------------------- Attachment: HARMONY-4282.patch Reattached file with ASF license granted. > [drlvm][vmcore] obj_info agreement between VM and GC > ---------------------------------------------------- > > Key: HARMONY-4282 > URL: https://issues.apache.org/jira/browse/HARMONY-4282 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: All > Reporter: Li-Gang Wang > Assignee: Gregory Shimansky > Attachments: HARMONY-4282.patch > > > I found some issue with obj_info initialization protocol between VM and GC. > Since there is a partitioning of the obj_info bits between VM and GC (GC takes the last 10 bits), VM should not touch the last 10 bits without strong argument. But in following piece of code, VM assumes the obj_info is empty after the object is allocated. This code makes some GC design impossible. > jobject object_clone(JNIEnv *jenv, jobject jobj) > { > ...... > result = (ManagedObject*)vm_new_vector_using_vtable_and_thread_pointer(length, vt->clss->get_allocation_handle(), vm_get_gc_thread_local()); // call gc_alloc > ...... > memcpy(result, h->object, size); // copy the old object > result->set_obj_info(0); // obj_info is reset here > ...... > } > This code should be changed to remove the obj_info reset statement, and the memcpy should copy only the object fields part, excluding the object header (vt and obj_info). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.