Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-8265

TDatabasePDG global static may be used before initialization

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • None
    • 6.08/00
    • None
    • None
    • Gentoo Linux x86_64

    Description

      Dear ROOTers,

      the "fgInstance" is a global static in TDatabasePDG and not yet "hidden" as a function local static so it may be used too early (for now I observed this only when user code uses TDatabasePDG in static initialization, but it may as well affect ROOT).

      I attach a patch which removes the "static TDatabasePDG *fgInstance;" member (which was even streamed...?), bumps the class version, and hides it as a function local static.

      Please review the patch, maybe you find an even nicer fix. I could not give it full testing yet since I am hit by ROOT-8264 .

      Cheers,
      Oliver

      Attachments

        Activity

          People

            pcanal Philippe Canal
            ofreyerm Oliver Freyermuth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: