8176442: [aix] assert(_thr_current == 0L) failed: Thread::current already initialized
Summary: Revert Thread::current() back to pthread library based TLS on AIX.
Reviewed-by: dholmes
--- a/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp Mon Mar 13 15:56:09 2017 -0700
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp Mon Mar 13 21:46:37 2017 -0400
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2016 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2017 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -153,6 +153,9 @@
// offset_of as it is defined for gcc.
#define offset_of(klass,field) (size_t)((intx)&(((klass*)16)->field) - 16)
+// AIX 5.3 has buggy __thread support. (see JDK-8176442).
+#define USE_LIBRARY_BASED_TLS_ONLY 1
+
#ifndef USE_LIBRARY_BASED_TLS_ONLY
#define THREAD_LOCAL_DECL __thread
#endif