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]

safety of GCJ-generated code


Adam Megacz writes:
 > 
 > Is GCJ-compiled code "safe" in the sense that no malicious input to a
 > program can possibly cause it to crash or jump to memory locations
 > that aren't part of its code? (ie buffer overflows, stack-busting). By
 > crash, I mean something beyond an uncaught exception.

By design, yes.  But we can't promise perfection, and neither can any
Java VM.

 > I know that normal JVMs have this property; and from my understanding
 > of GCJ, I believe that it does as well (assuming that you leave
 > bounds-checking turned on).
 > 
 > I guess if I wanted to be really precise, I ought to say "assuming
 > that the JVM/compiler/libgcj has no bugs, no matter how bug-ridden the
 > java code being compiled is, it will never behave in an unsafe manner".

Right.  But we're not perfect, and some components -- like the
verifier -- are rather new.

Andrew.


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