This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [RFA/JVMTI] Implement GetLocalVariableTable and GetMaxLocals
>>>>> "Kyle" == Kyle Galloway <kgallowa@redhat.com> writes:
>> (_Jv_AllocBytes (strlen (local_var_table[table_slot].name) + 1));
>> I don't see how memory allocated here can ever be freed.
Kyle> Not sure exactly what you mean here. I thought that memory allocated
Kyle> with _Jv_AllocBytes is garbage collected.
Oops, I misread this. You are correct.
Thanks.
This patch is ok.
[validation]
Kyle> The only thing that may cause a problem is if the slot values are
Kyle> invalid indicies into the variable array for that method, this is
Kyle> fairly easy to check for so i you think it's worthwhile I can add
Kyle> this. Invalid PC values don't really matter, in my thinking, since it
Kyle> will just result in garbage values begin in the slots when the
Kyle> debugger reads them.
My concern is that invalid bytecode cannot be used to somehow attack a
debug VM. So I think somewhere we should check indices so we can
never read or write memory out of bounds..
Tom