[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: Archie Cobbs
Subject: Re: [cp-patches] Patch: RFC: copy bytes in defineClass
Date: Wed, 11 Aug 2004 14:13:31 -0500 (CDT)

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.

Hmm.. in JC's case, yes we copy the class file bytes but no this
patch won't help any, because (a) the copying is done in the native
C code and (b) is done not for security reasons but for other reasons.
That is, even with this change JC will still have to copy the bytes
so in JC's case this change simply adds an unnecessary copy.

However, I agree with you that at least a comment should be added,
and that the "trusted code" argument is not sufficient.


Archie Cobbs      *        CTO, Awarix        *

reply via email to

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