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

Change `Decorable::declareDecorationWithOwner` to allow for finding link-time accidents.

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Because a pointer to the uninitialized most-derived class is passed to the ctor for whatever decoration is registered with `Decorable::declareDecorationWithOwner`, there is a risk that the ctor can use that pointer in such a way which is illegal but has "expected" behavior some of the time. This can be in a link dependent way.

      We'd like to change this such that the ctor for a decoration with owner accepts a "handle" (perhaps a functor) to the actual most derived class to allow for runtime detection of misuse.

      Attachments

        Activity

          People

            backlog-server-platform DO NOT USE - Backlog - Platform Team
            adam.martin@mongodb.com ADAM Martin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: