This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Illegal Package-Private Accesses Yet Again!
- From: Andrew Haley <aph at redhat dot com>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java at gcc dot gnu dot org, per at [24 dot 4 dot 99 dot 130]
- Date: Mon, 29 Mar 2004 20:05:46 +0100
- Subject: Illegal Package-Private Accesses Yet Again!
- References: <406870ED.735183B6@hotmail.com>
Ranjit Mathew writes:
> Hi,
>
> As Michael and Mark have repeatedly pointed out, the fact
> that GCJ still allows illegal package-private accesses lets
> incorrect code to slip into libgcj, creating merge problems with
> GNU Classpath.
>
> Recently Per unwittingly committed such code for NIO.
>
> We must fix this silly bug (PR java/9685) ASAP!
>
> I have updated my package-private access patch to the current
> mainline and have attached it with this mail.
>
> With this patch, one finds:
>
> 1. java.lang.VMThrowable illegally accessses stackTraceAddrs()
> from gnu.gcj.runtime.StackTrace
>
> 2. READ, WRITE, APPEND, EXCL, SYNC, DSYNC and available() in
> gnu.java.nio.channels.FileChannelImpl are illegally accessed
> by java.io.FileInputStream, java.io.FileOutputStream and
> java.io.RandomAccessFile
>
> 3. gnu.gcj.runtime.NameFinder illegally accesses the constructor
> of java.lang.StackTraceElement
Yeah. That's why we didn't fix the compiler before now.
If we fix the library code, then we can commit the compiler patch.
> In a follow up mail, I will post a simple patch to avoid the errors
> above,
Well, all you have to do is make some native access methods.
Andrew.