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

Coverity analysis defect 135206: Division or modulo by float zero

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Storage Execution
    • Fully Compatible
    • ALL
    • Execution Team 2023-03-06
    • 135

      Division or modulo by float zero

      This could cause an immediate crash or incorrect computation. An expression which may be zero is used as a divisor in floating-point arithmetic.
      /src/mongo/db/storage/collection_markers.cpp:466: DIVIDE_BY_ZERO 135206 Checking "numRecords == 0LL" implies that "numRecords" is 0 on the true branch.
      /src/mongo/db/storage/collection_markers.cpp:487: DIVIDE_BY_ZERO 135206 In expression "(double)dataSize / (double)numRecords", division by expression "numRecords" which may be zero has undefined behavior.

            Assignee:
            haley.connelly@mongodb.com Haley Connelly
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: