RFR(XS) 8239854: Cannot build gtest without PCH after 8239235. Missing include in test/hotspot/gtest/runtime/test_signatureStream.cpp

Reingruber, Richard richard.reingruber at sap.com
Mon Feb 24 10:35:24 UTC 2020


Hi,

I get the following error (after JDK-8239235) when building without precompiled headers:

/priv/d038402/hg/jdk/test/hotspot/gtest/runtime/test_signatureStream.cpp: In member function 'virtual void SignatureStream_check_refcount_test_vm_Test::TestBody()':
/priv/d038402/hg/jdk/test/hotspot/gtest/runtime/test_signatureStream.cpp:37:25: error: variable 'ResourceMark rm' has initializer but incomplete type
   ResourceMark rm(THREAD);

Bug: https://bugs.openjdk.java.net/browse/JDK-8239854

I would like to fix this with the patch below.

Thanks,
Richard.

diff --git a/test/hotspot/gtest/runtime/test_signatureStream.cpp b/test/hotspot/gtest/runtime/test_signatureStream.cpp
--- a/test/hotspot/gtest/runtime/test_signatureStream.cpp
+++ b/test/hotspot/gtest/runtime/test_signatureStream.cpp
@@ -22,6 +22,7 @@
  */
 
 #include "precompiled.hpp"
+#include "memory/resourceArea.hpp"
 #include "runtime/interfaceSupport.inline.hpp"
 #include "classfile/symbolTable.hpp"
 #include "runtime/signature.hpp"
@@ -85,4 +86,4 @@
 
   ASSERT_EQ(foo->refcount(), r1) << "refcount should have decremented";
 
-}
\ No newline at end of file
+}


More information about the hotspot-runtime-dev mailing list