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

Error handling logic of RHistImpl::GetBinIndex cannot be triggered

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core Libraries
    • Labels:
    • Environment:

      This is a code logic issue that isn't sensitive to the environment.

    • Development:

      Description

      RHistImpl::GetBinIndex has a code path to handle errors in Internal::RGetBinIndex, which is documented to be triggered by invalid input bin coordinates. However, a look at the RGetBinIndex implementation shows that no code path which sets the status flag to something other than kValid can be triggered when the GROW template parameter is false (as happens when it's called by GetBinIndex).

      I suspect that the intent was to have some bounds checking errors in at least debug builds, which were not actually implemented in the end. In my opinion, either such a bounds check should be added, or the misleading error checking code and documentation should be removed.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated: