There are several places in the GC coding which disable the warning Visual Studio warning "C4355: 'this' : used in base member initializer list":
src/share/vm/gc_implementation/g1/concurrentMark.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/g1/satbQueue.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp:#pragma warning( disable:4355 )
However this warning is reasonable and we've recently found a bug which was caused by the usage of the incompletely initialized this pointer in the initializer list (see 8068739).
It would be therefore better to remove the pragmas which disable the warning and refactor the code such that it doesn't use the 'this' pointer in the initializer list anymore.
src/share/vm/gc_implementation/g1/concurrentMark.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/g1/satbQueue.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp:#pragma warning( disable:4355 )
src/share/vm/gc_implementation/parNew/parNewGeneration.cpp:#pragma warning( disable:4355 )
However this warning is reasonable and we've recently found a bug which was caused by the usage of the incompletely initialized this pointer in the initializer list (see 8068739).
It would be therefore better to remove the pragmas which disable the warning and refactor the code such that it doesn't use the 'this' pointer in the initializer list anymore.
- relates to
-
JDK-8073188 Remove disable of old MSVC++ warning C4786
-
- Closed
-
-
JDK-8068739 G1CollectorPolicy uses uninitialized field '_sigma' in the constructor
-
- Resolved
-