8144702: Using tid decorator in Unified Logging may crash VM
authorstuefe
Sat, 05 Dec 2015 07:16:52 +0100
changeset 34646 e2442a5c90e4
parent 34645 f00769790a1b
child 34647 fafb32d71489
8144702: Using tid decorator in Unified Logging may crash VM Summary: LogDecorations::create_tid_decoration should avoid Thread::current() if possible. Reviewed-by: mlarsson, coleenp
hotspot/src/share/vm/logging/logDecorations.cpp
--- a/hotspot/src/share/vm/logging/logDecorations.cpp	Sat Dec 05 03:10:50 2015 +0000
+++ b/hotspot/src/share/vm/logging/logDecorations.cpp	Sat Dec 05 07:16:52 2015 +0100
@@ -96,7 +96,7 @@
 
 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)
 }