safety of GCJ-generated code
Andrew Haley
aph@cambridge.redhat.com
Mon Dec 17 09:54:00 GMT 2001
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.
More information about the Java
mailing list