Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8068883

Remove disabling of warning "C4355: 'this' : used in base member initializer list"

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                simonis Volker Simonis
                Reporter:
                simonis Volker Simonis
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: