Re: [aarch64-port-dev ] OpenJDK builds fails on AARCH64 with Ubuntu 1604
Hi Andrew, I didn't see a code change here. Did the compiler change on Jenkins? Can you report the gcc version used? Could also be change in compiler warning maybe-uninitialized (but I couldn't find one). For reference, within this function we have C++ code: ... bool need_mem_bar; switch (kind) { case Relaxed: need_mem_bar = mismatched || can_access_non_heap; break; case Opaque: // Opaque uses CPUOrder membars for protection against code movement. case Acquire: case Release: case Volatile: need_mem_bar = true; break; default: ShouldNotReachHere(); // I thought this was a "noreturn" function, but it's not... } ... if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder); - Derek From: Pinski, Andrew Sent: Friday, March 17, 2017 5:36 PM To: aarch64-port-dev@openjdk.java.net Cc: White, Derek <Derek.White@cavium.com> Subject: OpenJDK builds fails on AARCH64 with Ubuntu 1604 Hi, The current build of OpenJDK v9 fails on aarch64-linux-gnu. I don't know who else to write this to so I thought this is the correct place to report build failures. This started to fail on March 15, 2017. Thanks, Andrew Pinski Log: /home/jenkins/workspace/BuildOpenJDK/hs/hotspot/src/share/vm/opto/library_call.cpp: In member function 'bool LibraryCallKit::inline_unsafe_access(bool, BasicType, LibraryCallKit::AccessKind, bool)': /home/jenkins/workspace/BuildOpenJDK/hs/hotspot/src/share/vm/opto/library_call.cpp:2577:3: error: 'need_mem_bar' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder); ^ Creating support/modules_libs/java.base/jrt-fs.jar Note: /home/jenkins/workspace/BuildOpenJDK/hs/corba/src/java.corba/share/classes/com/sun/tools/corba/se/idl/som/idlemit/MetaPragma.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. cc1plus: all warnings being treated as errors lib/CompileJvm.gmk:201: recipe for target '/home/jenkins/workspace/BuildOpenJDK/hs/build/linux-aarch64-normal-server-release/hotspot/variant-server/libjvm/objs/library_call.o' failed make[3]: *** [/home/jenkins/workspace/BuildOpenJDK/hs/build/linux-aarch64-normal-server-release/hotspot/variant-server/libjvm/objs/library_call.o] Error 1 make[3]: *** Waiting for unfinished jobs....
On 17/03/17 22:20, White, Derek wrote:
I didn't see a code change here. Did the compiler change on Jenkins? Can you report the gcc version used?
Could also be change in compiler warning maybe-uninitialized (but I couldn't find one).
We had to fix a few of these before. I added code like this: static jlong as_long(LIR_Opr data) { jlong result; switch (data->type()) { case T_INT: result = (data->as_jint()); break; case T_LONG: result = (data->as_jlong()); break; default: ShouldNotReachHere(); result = 0; // unreachable } return result; } I hate having to do this. We can't tell GCC that ShouldNotReachHere is noreturn because then it doesn't generate backtrace information, and we need that for debugging. Andrew.
We also got this build failure on hs tree. It is apparently not aarch64 only. Maybe we should initialize need_mem_bar first. Just curious why gcc did not complain before Roland's change of that line of code. Thanks, Ningsheng On 18 March 2017 at 16:25, Andrew Haley <aph@redhat.com> wrote:
On 17/03/17 22:20, White, Derek wrote:
I didn't see a code change here. Did the compiler change on Jenkins? Can you report the gcc version used?
Could also be change in compiler warning maybe-uninitialized (but I couldn't find one).
We had to fix a few of these before. I added code like this:
static jlong as_long(LIR_Opr data) { jlong result; switch (data->type()) { case T_INT: result = (data->as_jint()); break; case T_LONG: result = (data->as_jlong()); break; default: ShouldNotReachHere(); result = 0; // unreachable } return result; }
I hate having to do this. We can't tell GCC that ShouldNotReachHere is noreturn because then it doesn't generate backtrace information, and we need that for debugging.
Andrew.
On 20/03/17 02:07, Ningsheng Jian wrote:
We also got this build failure on hs tree. It is apparently not aarch64 only. Maybe we should initialize need_mem_bar first.
No, please follow this pattern:
default: ShouldNotReachHere(); result = 0; // unreachable } return result; }
We do it this way because it needs to be clear to the reader that this is dead code, only inserted to shut up the compiler. Andrew.
participants (3)
-
Andrew Haley
-
Ningsheng Jian
-
White, Derek