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

RHistConcurrentFiller::(operator Hist&) considered harmful

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: master
    • Fix Version/s: None
    • Component/s: Core Libraries
    • Labels:
    • Environment:
    • Development:

      Description

      This implicit conversion of RHistConcurrentFiller to the underlying histogram type is very dangerous, because it lets one go from thread-safe histogram accesses to unsynchronized histogram accesses using constructs that are almost invisible in the user's code. This is a perfect recipe for hard-to-track data races.

      Therefore, I recommend removing the implicit conversion, reconsidering the need for even an explicit RHistConcurrentFiller::GetHist accessor, and if you decide to keep the latter adding documentation which clearly states that this method should not be used if the histogram may be filled by other threads in parallel.

        Attachments

          Activity

            People

            Assignee:
            hgraslan Hadrien Benjamin Grasland
            Reporter:
            hgraslan Hadrien Benjamin Grasland
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: