Coverity analysis defect 177336: Overflowed constant

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-10-13
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overflowed constant

      The overflowed value due to arithmetic on constants is too small or unexpectedly negative, causing incorrect computations. Integer overflow occurs in arithmetic on constant operands
      /src/mongo/db/query/stage_builder/sbe/gen_extract_field_paths.cpp:134: INTEGER_OVERFLOW 177336 "fieldPath.getPathLength()" is now known to have value 0 on this path.
      /src/mongo/db/query/stage_builder/sbe/gen_extract_field_paths.cpp:128: INTEGER_OVERFLOW 177336 Expression "fieldPath.getPathLength() - 1UL", where "fieldPath.getPathLength()" is known to be equal to 0, underflows the type of "fieldPath.getPathLength() - 1UL", which is type "unsigned long".

            Assignee:
            Niels Lohmann
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: