8144702: Using tid decorator in Unified Logging may crash VM

LogDecorations::create_tid_decoration should avoid Thread::current() if possible.

Reviewed-by: mlarsson, coleenp
This commit is contained in:
Thomas Stuefe 2015-12-05 07:16:52 +01:00
parent 560badbadc
commit c661a50764

View File

@ -96,7 +96,7 @@ char * LogDecorations::create_pid_decoration(char* pos) {
char * LogDecorations::create_tid_decoration(char* pos) {
int written = jio_snprintf(pos, DecorationsBufferSize - (pos - _decorations_buffer),
INTX_FORMAT, Thread::current()->osthread()->thread_id());
INTX_FORMAT, os::current_thread_id());
ASSERT_AND_RETURN(written, pos)
}