dragonwell-releng / issues-repo

0 stars 0 forks source link

[riscv64-8u]typeArrayOop.hpp:51:81: error: macro "assert" passed 4 arguments, but takes just 2 #44

Open sendaoYan opened 5 months ago

sendaoYan commented 5 months ago
Generating precompiled header precompiled.hpp.gch
In file included from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/thread.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/thread.inline.hpp:30,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/resourceArea.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/classfile/classFileParser.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/classfile/classLoader.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/classfile/systemDictionary.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/ci/ciEnv.hpp:30,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/ci/ciUtilities.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/ci/ciNullObject.hpp:30,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/ci/ciConstant.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/ci/ciArray.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled/precompiled.hpp:33:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/oops/typeArrayOop.hpp:51:81: error: macro "assert" passed 4 arguments, but takes just 2
   51 |     assert(is_within_bounds(which), "index %d out of bounds %d", which, length());
      |                                                                                 ^
In file included from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/globals.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/allocation.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/iterator.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/oops/klass.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/handles.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/universe.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/code/oopRecorder.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/asm/codeBuffer.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/asm/assembler.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/utilities/debug.hpp:154: note: macro "assert" defined here
  154 |   #define assert(p,msg)
      | 

make-hotspot.log

sendaoYan commented 5 months ago
diff --git a/hotspot/src/share/vm/utilities/debug.hpp b/hotspot/src/share/vm/utilities/debug.hpp
index 3c3f8afe201..00521cd3211 100644
--- a/hotspot/src/share/vm/utilities/debug.hpp
+++ b/hotspot/src/share/vm/utilities/debug.hpp
@@ -151,7 +151,8 @@ do {                                                                         \
 // Do not assert this condition if there's already another error reported.
 #define assert_if_no_error(cond,msg) assert((cond) || is_error_reported(), msg)
 #else // #ifdef ASSERT
-  #define assert(p,msg)
+  // For backward compatibility.
+  #define assert(p, ...) vmassert(p, __VA_ARGS__)
   #define assert_status(p,status,msg)
   #define assert_if_no_error(cond,msg)
 #endif // #ifdef ASSERT
sendaoYan commented 5 months ago

To github.com:sendaoYan/riscv-port-jdk8u-ysd.git 72ce7390a7f..18d59c95407 jbs8276799 -> jbs8276799