changeset 10041:0a209712389c

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
author stuefe
date Sat, 05 Dec 2015 07:16:52 +0100
parents 924d06b7fb3a
children ce87b1141c12
files src/share/vm/logging/logDecorations.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/logging/logDecorations.cpp	Sat Dec 05 03:10:50 2015 +0000
+++ b/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)
 }