This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Illegal Package-Private Accesses Yet Again!


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]