Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Jun 2002 12:46:54 +0900 (JST)
From:      shudo@computer.org
To:        jstepka@webprogrammers.net, freebsd-java@FreeBSD.ORG
Subject:   Re: jdk 1.3.1p6 + shujit + orion 1.5.4
Message-ID:  <20020609.124654.596520665.shudoh@localhost>
In-Reply-To: <004b01c20f4c$678a8e60$1f01010a@jstepkaxp>
References:  <004b01c20f4c$678a8e60$1f01010a@jstepkaxp>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020609.124654.596520665.shudoh>