Build failure on zero/openjdk9

Ivan Krylov ivan at azulsystems.com
Wed May 6 13:01:30 UTC 2015


Hi folks,

Today I found a small error in the printf parameters that prevents 
openjdk9 to build in a zero configuration.
Who owns hotspot/src/cpu/zero/vm/frame_zero.cpp ?

This is the build error:
/home/ivan/openjdk9/hotspot/src/cpu/zero/vm/frame_zero.cpp: In member 
function ‘void frame::zero_print_on_error(int, outputStream*, char*, 
int) const’:
/home/ivan/openjdk9/hotspot/src/cpu/zero/vm/frame_zero.cpp:216:73: 
error: format ‘%lx’ expects argument of type ‘long unsigned int’, but 
argument 3 has type ‘intptr_t* {aka long int*}’ [-Werror=format=]
      st->print_cr(" " PTR_FORMAT ": %-21s = %s", addr, fieldbuf, valuebuf);
^
cc1plus: all warnings being treated as errors

---

The patch is trivial (I am the OCA signatory as ikrylov)

ivan:~/openjdk9/hotspot$ hg diff
diff -r 86ab44ce262e src/cpu/zero/vm/frame_zero.cpp
--- a/src/cpu/zero/vm/frame_zero.cpp    Thu Apr 30 13:02:03 2015 -0700
+++ b/src/cpu/zero/vm/frame_zero.cpp    Wed May 06 15:55:10 2015 +0300
@@ -213,7 +213,7 @@
      valuebuf[buflen - 1] = '\0';

      // Print the result
-    st->print_cr(" " PTR_FORMAT ": %-21s = %s", addr, fieldbuf, valuebuf);
+    st->print_cr(" " PTR_FORMAT ": %-21s = %s", p2i(addr), fieldbuf, 
valuebuf);
    }
  }

Can someone push the change or do I need to file the bug/go through code 
review process?

Thanks,

Ivan





More information about the zero-dev mailing list