RFR(S) 8209950: SIGBUS in CodeHeapState::print_names()

Tobias Hartmann tobias.hartmann at oracle.com
Tue Aug 28 08:37:22 UTC 2018


Hi Lutz,

On 28.08.2018 10:24, Schmidt, Lutz wrote:
> I observed a NULL pointer for method->signature() in sharedRuntime.cpp, but never saw garbage (which would need is_readable_poiner() to detect). To that end, the is_readable_pointer() check is not necessary. I added is anyway out of "bad experience". Is_readable_pointer() isn't a cheap check, so there always is a tradeoff. I can add the check to method->name() as well if you require it. 

Okay, I'm fine with keeping the is_readable_pointer() check.

> A more general remark on the situation we are dealing with here:
> In codeHeapState.cpp, I know we are running without any safety net: the CodeCache_lock is not held, opening the door to arbitrary concurrent state changes in the code cache. We need extra precautions to compensate for the missing safety net. 
> In sharedRuntime.cpp, on the other hand, we are protected by the CodeCache_lock. CodeCache::nmethods_do() asserts that. The lock obviously doesn't protect us from seeing inconsistent nmethod states. That could be subject of a separate investigation.

Okay, thanks for the details.

Reviewed.

Best regards,
Tobias


More information about the hotspot-compiler-dev mailing list