Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 64205 invoked from network); 30 Oct 2007 13:25:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2007 13:25:40 -0000 Received: (qmail 19527 invoked by uid 500); 30 Oct 2007 13:25:01 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 19513 invoked by uid 500); 30 Oct 2007 13:25:01 -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 19501 invoked by uid 99); 30 Oct 2007 13:25:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2007 06:25:01 -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; Tue, 30 Oct 2007 13:25:23 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9F792714035 for ; Tue, 30 Oct 2007 06:24:50 -0700 (PDT) Message-ID: <24413934.1193750690636.JavaMail.jira@brutus> Date: Tue, 30 Oct 2007 06:24:50 -0700 (PDT) From: "Alexey Varlamov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-5016) [drlvm][jit][opt] code patching may corrupt calls to helpers on x86-64 in OPT mode In-Reply-To: <14259595.1193250051138.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-5016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Varlamov resolved HARMONY-5016. -------------------------------------- Resolution: Fixed Fixed last issue at revision: 590063. Passed EHWA with the large heap, HeapTest and HeapTest usually finish at ~650th iteration with OOME. BTW, I guess it worths to place these tests to svn - do you have any ideas, to which suite? > [drlvm][jit][opt] code patching may corrupt calls to helpers on x86-64 in OPT mode > ---------------------------------------------------------------------------------- > > Key: HARMONY-5016 > URL: https://issues.apache.org/jira/browse/HARMONY-5016 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: Linux x86-64 > Reporter: Pavel Afremov > Assignee: Alexey Varlamov > Priority: Critical > Attachments: H5016.diff > > > On Linux x86-64, DRL VM crashed by assert of null allocation handler (second parametr) in fast_gc_alloc. > It called from JITed code > at org.apache.harmony.kernel.vm.VM. > ...\drlvm\vm\vmcore\src\kernel_classes\javasrc\org\apache\harmony\kernel\vm\VM.java ln 120 > internedStrings = new InternMap(32768); > The source of the bug is in folowing: > 1. If ofset between callee and caller fits in 32 bits signed value, OPT generates following code: > 0x00002aab0b490000: push %rbx > 0x00002aab0b490001: mov $0x90edf5,%rbx > 0x00002aab0b49000b: movb $0x0,(%rbx) > 0x00002aab0b49000e: mov $0x90edf4,%rbx > 0x00002aab0b490018: movb $0x0,(%rbx) > 0x00002aab0b49001b: mov $0x20,%edi > 0x00002aab0b490020: mov $0x2c68,%rsi > 0x00002aab0b49002a: callq 0x2aaaac2bf950 > 2. If offset more then 32 bits signed value OPT generates following code: > 0x00002aab49c90000: push %rbx > 0x00002aab49c90001: mov $0x9665e5,%rbx > 0x00002aab49c9000b: movb $0x0,(%rbx) > 0x00002aab49c9000e: mov $0x9665e4,%rbx > 0x00002aab49c90018: movb $0x0,(%rbx) > 0x00002aab49c9001b: mov $0x20,%edi > 0x00002aab49c90020: mov $0x2aaaac2bf950,%r11 > 0x00002aab49c9002a: data16 > 0x00002aab49c9002b: nop > 0x00002aab49c9002c: rex64Z callq *%r11 > In this code second parameter is missed, rsi is not initialized, and fast_gc_alloc asserts by this reason. > I think that this bug can be reproduced on any x86-64 platform, both Linux and Windows. > But I can reproduce it on Linux x86-64 machine only. > To reproduce the bug, run any class or test in OPT mode with large heap on Linux x86-64 debug build, like in following command: > .../jdk/jre/bin/java -Xem:opt -Xmx3500m Hi > DRLVM in JET mode works OK. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.