Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 34575 invoked from network); 4 Oct 2006 09:17:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Oct 2006 09:17:10 -0000 Received: (qmail 48561 invoked by uid 500); 4 Oct 2006 09:17:10 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 48461 invoked by uid 500); 4 Oct 2006 09:17:10 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 48448 invoked by uid 99); 4 Oct 2006 09:17:10 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Oct 2006 02:17:10 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [209.237.227.198] ([209.237.227.198:49325] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id DA/92-00170-D0C73254 for ; Wed, 04 Oct 2006 02:17:01 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 63F3D7142A7 for ; Wed, 4 Oct 2006 02:16:22 -0700 (PDT) Message-ID: <22277343.1159953382406.JavaMail.root@brutus> Date: Wed, 4 Oct 2006 02:16:22 -0700 (PDT) From: "Egor Pasko (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-1682) Jitrino.OPT performs incorrect GC enumeration in nested loop with array accesses In-Reply-To: <3775493.1159948401769.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1682?page=comments#action_12439775 ] Egor Pasko commented on HARMONY-1682: ------------------------------------- Ivan, do you have a small 100% reproducer for the interior pointer problem? would be great > Jitrino.OPT performs incorrect GC enumeration in nested loop with array accesses > -------------------------------------------------------------------------------- > > Key: HARMONY-1682 > URL: http://issues.apache.org/jira/browse/HARMONY-1682 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: Linux/IA32 > Reporter: Egor Pasko > Priority: Critical > Attachments: ClTest.java > > > the problem in brief: > (see more details in the attached test) > for (int i = 0; i < N; i++) { > something = A[i].Something(); > for (int j = 0; j < A[i].getArray().length; j++) { > // perform some GC intensive action here > if (A[i].getArray()[j].getName().equals("xxx")) { > // use A[i] here > break; > } > } > } > "memopt" optimization pass eliminates the innermost memory read accesses to A[i] preserving a temporary reference to the object in the innermost loop. When a GC intensive action is performed, the array (A) is moved to another location, but the temporary reference is not updated with GC (which leads to crash). So, I suspect a problem in GC enumeration or, maybe, some other aspects of JIT<->GC interface. > some facts: > On Jitrino.JET the test passes. > On Jitrino.OPT the test leads to crash: > $ $JAVA -Xem:opt ClTest > SIGSEGV in VM code. > Stack trace: > 1: ?? (??:-1) > > Segmentation fault > If "memopt" is turned OFF in opt.emconf, the test passes on Jitrino.OPT (but memopt performs correct transformations, which is visible from log files) > If a larger Java heap is specified (which postpones GC actions), the test takes longer to run, but crashes, anyway: > $ $JAVA -Xms1024m -Xmx1024m -Xem:opt ClTest > 1_20 > 2_20 > 3_20 > 4_20 > 5_20 > 6_20 > 7_20 > 8_20 > 9_20 > SIGSEGV in VM code. > Stack trace: > 1: ?? (??:-1) > > Segmentation fault > The test is reduced from the kernel test ClassLoaderTest which fails with exactly the same symptoms. -- 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