-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b163
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8178207 | 10 | Philip Race | P2 | Resolved | Fixed | b04 |
make
Building target 'default (exploded-image)' in configuration 'linux-x86_64-normal-server-release'
Updating support/modules_libs/java.base/server/libjvm.so due to 1 file(s)
/client/hotspot/src/share/vm/opto/library_call.cpp: In member function ‘bool LibraryCallKit::inline_unsafe_access(bool, BasicType, LibraryCallKit::AccessKind, bool)’:
client/hotspot/src/share/vm/opto/library_call.cpp:2578:3: error: ‘need_mem_bar’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder);
^
cc1plus: all warnings being treated as errors
make[3]: *** /client/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/library_call.o] Error 1
lib/CompileJvm.gmk:201: recipe for target '/client/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/library_call.o' failed
make[2]: *** [hotspot-server-libs] Error 1
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
This is a warnings-as-errors failure and whilst I don't see that this
specific change did anything wrong it was enough to 'wake up'
the compiler to this pattern which it probably should have
complained about all along ..
Clearly the hotspot code does not expect this to actually occur,
but the compiler can't be expected to know this.
The fix should be as simple as
- bool need_mem_bar;
+ bool need_mem_bar = false
Building target 'default (exploded-image)' in configuration 'linux-x86_64-normal-server-release'
Updating support/modules_libs/java.base/server/libjvm.so due to 1 file(s)
/client/hotspot/src/share/vm/opto/library_call.cpp: In member function ‘bool LibraryCallKit::inline_unsafe_access(bool, BasicType, LibraryCallKit::AccessKind, bool)’:
client/hotspot/src/share/vm/opto/library_call.cpp:2578:3: error: ‘need_mem_bar’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
if (need_mem_bar) insert_mem_bar(Op_MemBarCPUOrder);
^
cc1plus: all warnings being treated as errors
make[3]: *** /client/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/library_call.o] Error 1
lib/CompileJvm.gmk:201: recipe for target '/client/build/linux-x86_64-normal-server-release/hotspot/variant-server/libjvm/objs/library_call.o' failed
make[2]: *** [hotspot-server-libs] Error 1
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
This is a warnings-as-errors failure and whilst I don't see that this
specific change did anything wrong it was enough to 'wake up'
the compiler to this pattern which it probably should have
complained about all along ..
Clearly the hotspot code does not expect this to actually occur,
but the compiler can't be expected to know this.
The fix should be as simple as
- bool need_mem_bar;
+ bool need_mem_bar = false
- backported by
-
JDK-8178207 hotspot change for 8176513 breaks jdk9 build on Ubuntu 16.04
-
- Resolved
-
- relates to
-
JDK-8176513 Poor code quality for ByteBuffers
-
- Resolved
-