RawData ?
Tom Tromey
tromey@redhat.com
Tue Apr 8 21:28:00 GMT 2003
Brian> I don't see anything really special here except perhaps
Brian> insuring garbage collection works appropriately.
Well, if non-Object data is put into a RawData field, and untrusted
Java code can somehow access such a field and cast it to Object, then
this code can potentially crash the VM. For instance it could make a
method call on some random pointer.
We could just audit all the code to make sure a RawData is never
visible to user code. We haven't done that though. And that seems
fundamentally less safe, since we also have to audit all access paths
(reflection at least) and also make sure that changes in the future
don't break this (difficult since there is no warning if you do
introduce a bug here).
Tom
More information about the Java
mailing list