review request for 6608862 & 6459085

Xiaobin Lu Xiaobin.Lu at Sun.COM
Tue Aug 12 11:46:51 PDT 2008

Webrev: http://javaweb.sfbay/~xl116366/webrev/6459085/


This is a trivial fix for 6459085: naked pointer subtractions in class 
data sharing code. We should try to call pointer_delta instead of doing 
naked pointer operation to avoid surprise later. I also throw in a 
trivial fix to our linux make file. It seems like on Redhat 4, chcon 
command does not accept arguments to change the context for shared 
library and the OS in fact allows relocation to shared object file even 
with SELinux enabled. I guess that is because SELinux is in evolution 
and it is not as mature as later version such as RH5 etc. The failure 
execution of chcon command will cause VM build failure and exit. I 
actually removed the "exit 1" to let the build continue. I built and 
tested in dumbbell.east which is a Redhat 4 AS machine.

Webrev: http://javaweb.sfbay/~xl116366/webrev/6608862/


When some JVMTI operation such as stack walking is executed, 
Threads::threads_do will be called. While in the meantime, the VM is 
exiting as well and as a result, WatcherThread::watcher_thread returns 
NULL and the memory taken by it might be gone. To lock the WatcherThread 
in memory while do_thread is called on it, we grab the Terminator_lock 
which is also needs to be locked when WatcherThread exits and sets 
itself to NULL, this way, we can be certain that the WatcherThread and 
all its data structure is still there for reference. (thanks to David 
Holme's suggestion).

Verified by:
Test came with the bug report passed.
NSK vm.full.testlist

Thanks in advance.


More information about the hotspot-dev mailing list