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

TDatabasePDG global static may be used before initialization

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.08/00
    • Component/s: None
    • Labels:
      None
    • Environment:

      Gentoo Linux x86_64

    • Development:

      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

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

              Dates

              Created:
              Updated:
              Resolved: