[kaffe] (Maybe Bug Report): kaffe-1.1.5: Garbage collector:threadData.jvmpiData not scanned for pointers

Alexander Petrossian paf at design.ru
Sun Jun 26 23:31:02 PDT 2005


Guilhem Lavaux @ Friday, June 24, 2005 8:55 PM:
> I am not a JVMPI expert but SetThreadLocalStorage is only there to
> record that some pointer is affected to some thread. I am not
> sure this must be walked by the GC as this may be a "weak" reference. 

thanks, Guilhem, with your punch I've took a closer look and found that 
that particular JVMPI interface function is not used in ThreadLocal class implementation 
as I guessed it was from just the name of it.

I've grepped more and found NO usages of 
	JVMPI_Interface::SetThreadLocalStorage
which means that this particular part is just reserved for some future use.

so there's NO bug here ;) Just a confusing name.

thanks again.
Alexander


> On Fri, 2005-06-24 at 17:31 +0400, Alexander Petrossian wrote:
>> jvmpiSetThreadLocalStorage puts a pointer to local storage instances
>> 	there: KTHREAD(get_data)(jt)->jvmpiData = ptr;
>> but that field:
>> 	threadData.jvmpiData
>> is not scanned for pointers neither here
>> 	liveThreadWalker [gc-refs.c]
>> which only looks into
>> 	thread_data->jnireferences
>> nor anywhere else.
>> 
>> the letters "jvmpiData" only occur in 3 places in source
>> distribution: 
>> 
>> ./kaffe/jvmpi/
>>     431:jvmpi_kaffe.c  jvmpiGetThreadLocalStorage
>>     655:jvmpi_kaffe.c  jvmpiSetThreadLocalStorage
>> ./kaffe/kaffevm/
>>     25:threadData.h    declaration
>> 
>> this looks like a but to me, since if that storage would
> hold a last pointer to an object,
>> that object will be reclaimed during garbage collect.
>> 
>> test case for that should be obvious.
>> 
>> I myself am not a java developer, I even have no kaffe binaries, so
>> I can't run it. 
>> 
>> In case this is NOT a bug, please provide a short
> explanation to "how that can work".
>> 
>> Alexander Petrossian, Moscow, Russia.
>> 
>> 
>> _______________________________________________
>> kaffe mailing list
>> kaffe at kaffe.org
>> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe



Александр Петросян
______________________________________________________________________
paf at design.ru | http://paf.design.ru




More information about the kaffe mailing list