Illegal Package-Private Accesses Yet Again!

Andrew Haley aph@redhat.com
Wed Mar 31 07:43:00 GMT 2004


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.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /