Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-41914

Undefined Sanitizer: conf...../kv_engine/engines/ep/src/vb_count_visitor.h:97:42: runtime error: 1.84467e+21 is outside the range of representable values of type 'unsigned long'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • master
    • couchbase-bucket
    • None
    • Untriaged
    • 1
    • Unknown

    Description

      New failure seen on CV for a number of patches

      Undefined Sanitizer: conf...../kv_engine/engines/ep/src/vb_count_visitor.h:97:42: runtime error: 1.84467e+21 is outside the range of representable values of type 'unsigned long'

      Looking at the code and error

       size_t getMemResidentPer() {
              size_t numResident = numItems - nonResident;
              return (numItems != 0) ? (size_t)(numResident * 100.0) / (numItems)
                                     : 100;
          }
      

      I think it's this expression triggering the problem - (size_t)(numResident * 100.0) which suggests numResident is already very large before being multiplied as a float type and casted back to size_t?

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jwalker Jim Walker
              jwalker Jim Walker
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty