Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 95670 invoked from network); 3 May 2007 11:04:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 May 2007 11:04:36 -0000 Received: (qmail 49548 invoked by uid 500); 3 May 2007 11:04:43 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 49444 invoked by uid 500); 3 May 2007 11:04:42 -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 49435 invoked by uid 99); 3 May 2007 11:04:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2007 04:04:42 -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, 03 May 2007 04:04:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 91FF5714065 for ; Thu, 3 May 2007 04:04:15 -0700 (PDT) Message-ID: <26367463.1178190255594.JavaMail.jira@brutus> Date: Thu, 3 May 2007 04:04:15 -0700 (PDT) From: "Pavel Pervov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3799) [drlvm][jvmti] compatibility: GetVersionNumber returns the value with zero micro version In-Reply-To: <10223757.1178174415531.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-3799?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Pervov updated HARMONY-3799: ---------------------------------- Attachment: H3799.patch The patch is one-liner actually. > [drlvm][jvmti] compatibility: GetVersionNumber returns the value with zero micro version > ---------------------------------------------------------------------------------------- > > Key: HARMONY-3799 > URL: https://issues.apache.org/jira/browse/HARMONY-3799 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Reporter: Vera Petrashkova > Priority: Minor > Attachments: GVN.zip, H3799.patch > > > According to JVMTI specifications > GetVersionNumber returns value which is the version identifier. > The version identifier includes major, minor and micro version as well as the interface type. > DRLVM returns version identifier which contains zero micro version while > RI returns version number which parts equal: > major = 1, minor = 0 and micro = 36 > It looks like DRLVM returns version number which equals to JVMTI_VERSION_1_0. > > To reproduce this run the following test: > ---------------GVN.java------------- > public class GVN { > static public void main(String args[]) { > return; > } > } > ------------------------------GVN.cpp------------------------------ > #include > #include "jvmti.h" > static jvmtiEnv *jvmti = NULL; > JNIEXPORT jint > JNICALL Agent_OnLoad(JavaVM *jvm, char *options, void *reserved) { > jvmtiError err; > jint res; > jint ver_ptr; > jint micro_rt; > jint minor_rt; > jint major_rt; > res = jvm->GetEnv((void **) &jvmti, JVMTI_VERSION_1_0); > if (res != JNI_OK || jvmti == NULL) { > return JNI_ERR; > } > err = jvmti->GetVersionNumber(&ver_ptr); > fprintf(stderr,"Version number: %x JVMTI_VERSION_1_0: %x \n", ver_ptr, JVMTI_VERSION_1_0); > major_rt = (ver_ptr & JVMTI_VERSION_MASK_MAJOR) >> JVMTI_VERSION_SHIFT_MAJOR; > minor_rt = (ver_ptr & JVMTI_VERSION_MASK_MINOR) >> JVMTI_VERSION_SHIFT_MINOR; > micro_rt = (ver_ptr & JVMTI_VERSION_MASK_MICRO) >> JVMTI_VERSION_SHIFT_MICRO; > if (micro_rt > 0 ) { > fprintf(stderr, "PASSED\n"); > } else { > fprintf(stderr, "FAILED\n "); > } > fprintf(stderr, "\tRuntime version: %d.%d.%d\n", major_rt, minor_rt, micro_rt); > fflush(stderr); > > > return JNI_OK; > } > -------------------------------------------- > Create GVN.dll or use library from attachment > Run test GVN > java -showversion -agentlib:GVN GVN > Output on RI: > ============== > Version number: 30010024 JVMTI_VERSION_1_0: 30010000 > PASSED > Runtime version: 1.0.36 > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > Output on DRLVM: > ================= > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r532358, (Apr 25 2007), Windows/ia32/msvc 1310, debug build > http://incubator.apache.org/harmony > Version number: 30010000 JVMTI_VERSION_1_0: 30010000 > FAILED > Runtime version: 1.0.0 > This bug causes the failure of the test > vm.jvmti.funcs.GetVersionNumber.GetVersionNumber0101.GetVersionNumber0101. > from DRLVM Validation Test Suite (http://issues.apache.org/jira/browse/HARMONY-3206) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.