Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8205296 | 11.0.1 | Aleksey Shipilev | P4 | Resolved | Fixed | team |
In Epsilon GC, we have the call like:
EpsilonBarrierSet::EpsilonBarrierSet() : BarrierSet(
make_barrier_set_assembler<BarrierSetAssembler>(),
make_barrier_set_c1<BarrierSetC1>(),
make_barrier_set_c2<BarrierSetC2>(),
BarrierSet::FakeRtti(BarrierSet::EpsilonBarrierSet)) {};
...and some compilers (notably Mac OS builds) complain that:
/Users/yosemite/jdk-sandbox/src/hotspot/share/gc/epsilon/epsilonBarrierSet.cpp:40:11: error: base class 'BarrierSet' is uninitialized when used here to access 'BarrierSet::make_barrier_set_assembler<BarrierSetAssembler>' [-Werror,-Wuninitialized]
make_barrier_set_assembler<BarrierSetAssembler>(),
^
/Users/yosemite/jdk-sandbox/src/hotspot/share/gc/epsilon/epsilonBarrierSet.cpp:41:11: error: base class 'BarrierSet' is uninitialized when used here to access 'BarrierSet::make_barrier_set_c1<BarrierSetC1>' [-Werror,-Wuninitialized]
make_barrier_set_c1<BarrierSetC1>(),
^
/Users/yosemite/jdk-sandbox/src/hotspot/share/gc/epsilon/epsilonBarrierSet.cpp:42:11: error: base class 'BarrierSet' is uninitialized when used here to access 'BarrierSet::make_barrier_set_c2<BarrierSetC2>' [-Werror,-Wuninitialized]
make_barrier_set_c2<BarrierSetC2>(),
This warning is legit: we are calling instance method of BarrierSet before initializing it. But, those methods are just factory methods, and they could be static, resolving the warning.
EpsilonBarrierSet::EpsilonBarrierSet() : BarrierSet(
make_barrier_set_assembler<BarrierSetAssembler>(),
make_barrier_set_c1<BarrierSetC1>(),
make_barrier_set_c2<BarrierSetC2>(),
BarrierSet::FakeRtti(BarrierSet::EpsilonBarrierSet)) {};
...and some compilers (notably Mac OS builds) complain that:
/Users/yosemite/jdk-sandbox/src/hotspot/share/gc/epsilon/epsilonBarrierSet.cpp:40:11: error: base class 'BarrierSet' is uninitialized when used here to access 'BarrierSet::make_barrier_set_assembler<BarrierSetAssembler>' [-Werror,-Wuninitialized]
make_barrier_set_assembler<BarrierSetAssembler>(),
^
/Users/yosemite/jdk-sandbox/src/hotspot/share/gc/epsilon/epsilonBarrierSet.cpp:41:11: error: base class 'BarrierSet' is uninitialized when used here to access 'BarrierSet::make_barrier_set_c1<BarrierSetC1>' [-Werror,-Wuninitialized]
make_barrier_set_c1<BarrierSetC1>(),
^
/Users/yosemite/jdk-sandbox/src/hotspot/share/gc/epsilon/epsilonBarrierSet.cpp:42:11: error: base class 'BarrierSet' is uninitialized when used here to access 'BarrierSet::make_barrier_set_c2<BarrierSetC2>' [-Werror,-Wuninitialized]
make_barrier_set_c2<BarrierSetC2>(),
This warning is legit: we are calling instance method of BarrierSet before initializing it. But, those methods are just factory methods, and they could be static, resolving the warning.
- backported by
-
JDK-8205296 BarrierSet::make_* should be static
-
- Resolved
-