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

UBSan: Invalid static_cast from BinprotCommandT

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.0
    • 5.5.0
    • couchbase-bucket
    • Untriaged
    • Unknown

    Description

      UBSan complains about incorrect cast to derived in BinprotCommandT:

      client_mcbp_commands.h:217:16: runtime error: downcast of address 0x7ffeefbfe5d0 which does not point to an object of type 'BinprotSaslAuthCommand'
      0x7ffeefbfe5d0: note: object is of type 'BinprotCommandT<BinprotSaslAuthCommand, (unsigned char)33>'
      

      I'm not totally sure this warning is accurate; the use of
      static_cast<> here (CRTP) should be valid. However it (a) possibly
      isn't, or (b) we are missing some RTTI information to allow UBSan to
      check the cast.

      Attachments

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

        Activity

          People

            drigby Dave Rigby (Inactive)
            drigby Dave Rigby (Inactive)
            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