On Saturday 11 November 2006 01:36 Weldon Washburn wrote:
> I might be misunderstanding the code but the local variable,
> "hythread_monitor_t monitor;" is used as a parameter to a call to
> array_add(jvmti_monitor_table, monitor);.  It seems that once
> jthread_raw_monitor_create() returns, the jvmti_monitor_table will end up
> with an invalid pointer.  Is this correct?

It looks more like monitor value which is initialized in hythread_monitor_init 
is passed to array_add and there it is remembered. It is not a problem that 
monitor is a local variable since hythread_monitor_init provides a pointer to 
a data allocated somewhere not on the stack.

-- 
Gregory Shimansky, Intel Middleware Products Division

Reply via email to