Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-101227

Coverity analysis defect 151825: Overflowed constant

    • Query Optimization
    • Fully Compatible
    • ALL
    • QO 2025-02-17

      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
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main_/src/mongo/db/query/planner_wildcard_helpers.cpp:108: INTEGER_OVERFLOW 151825 "i" = "0UL", its value is now 0.
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main_/src/mongo/db/query/planner_wildcard_helpers.cpp:114: INTEGER_OVERFLOW 151825 Expression "i - 1UL", which is equal to 18446744073709551615, where "i" is known to be equal to 0, underflows the type that receives it, an unsigned integer 64 bits wide.

            Assignee:
            william.qian@mongodb.com William Qian
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: