[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cp-patches] Patch: RFC: copy bytes in defineClass

From: Jeroen Frijters
Subject: RE: [cp-patches] Patch: RFC: copy bytes in defineClass
Date: Thu, 12 Aug 2004 09:12:17 +0200

Tom Tromey wrote:
> It seems to me that defineClass() ought to always copy the data it is
> given, to prevent user code from modifying it while it during/after
> processing.  And furthermore it seemed slightly better to me to do
> this once, in Classpath, instead of letting every VM do it separately.

Like Archie Cobbs says, many VMs probably already do copy the array, so
doing it in Classpath might be wasteful. I also don't agree with your
premise that you must copy to be secure, if you write your class file
parser carefully to read each byte in the array only once, you can get
away with not copying it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]