From owner-freebsd-java Sat Jun 8 20:47: 2 2002 Delivered-To: freebsd-java@freebsd.org Received: from mx1.aist.go.jp (mx1.aist.go.jp [150.29.246.133]) by hub.freebsd.org (Postfix) with ESMTP id A766537B404 for ; Sat, 8 Jun 2002 20:46:54 -0700 (PDT) Received: from rpsmtp1.aist.go.jp by mx1.aist.go.jp with ESMTP id g593kjH26665; Sun, 9 Jun 2002 12:46:45 +0900 (JST) env-from (shudo@computer.org) Received: from mail10.aist.go.jp by rpsmtp1.aist.go.jp with ESMTP id g593kjV22241; Sun, 9 Jun 2002 12:46:45 +0900 (JST) env-from (shudo@computer.org) Received: from aist.go.jp by mail10.aist.go.jp with ESMTP id g593kiY28016; Sun, 9 Jun 2002 12:46:44 +0900 (JST) env-from (shudo@computer.org) Date: Sun, 09 Jun 2002 12:46:54 +0900 (JST) Message-Id: <20020609.124654.596520665.shudoh@localhost> To: jstepka@webprogrammers.net, freebsd-java@FreeBSD.ORG Subject: Re: jdk 1.3.1p6 + shujit + orion 1.5.4 From: shudo@computer.org In-Reply-To: <004b01c20f4c$678a8e60$1f01010a@jstepkaxp> References: <004b01c20f4c$678a8e60$1f01010a@jstepkaxp> X-Mailer: Mew version 2.1 on XEmacs 21.4.6 (Common Lisp) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi Justen, > I am wondering if anyone has had any luck running Orion 1.5.4 with the > jdk1.3.1p6 + ShuJIT packages? > > Currently I am able to start Orion with ShuJIT, but when I try and access > the server I get the following as an output to the webbrowser with zero > console output: > > java.lang.IllegalAccessError: final or private field > at com.evermind[Orion/1.5.4 (build 10585)]._cp._shb(., Compiled Code) > If I turn off ShuJIT, the system will work instantly. Throwing the exception in that situation is certainly a shuJIT's peculiar feature. But it is the correct behavior prescribed by the Java Language and JVM specification. Orion is violating access boundary and slack access control of JDK misses the bug. There are bugs in both Orion 1.5.4 and the JDK. I have received a report on this problem three weeks ago. I could track down the cause of it and sumitted a bug report to Orion's Bugzilla. see http://bugzilla.orionserver.com/bugzilla/show_bug.cgi?id=796 The mechanism of the Orion's bug is as follows: The `_shb' method of the `com.evermind._cp' class tries to access the `lock' field of the `com.evermind.server.http.HttpDateFormat'. The `lock' field is specifiad as `static final' and without any access modifier (e.g. public, protected or private). Then, the field cannot be accessed from other package. According to the Java specifications the com.evermind._cp#_shb() cannot access the com.evermind.server.http.HttpDateFormat#lock. But the slack access control of JDK allows such an illegal access. ShuJIT catches the access and throw an IllegalAccessError. I have implemented a work-around on shuJIT. I placed a new archive of shuJIT named shujit-020521.tar.gz on the shuJIT web page. In compiler.h in the new archive, you can find a line as follows: #undef SLACK_ACCESS_CONTROL If this line is changed to `#define', the strict access control of shuJIT will be loosen and Orion 1.5.4 will run. Kazuyuki Shudo shudo@computer.org http://www.shudo.net/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message