Test that mongoc_topology_compatible accepts null bson_error_t pointer

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.8.1, 1.9.0
    • Affects Version/s: 1.9.0
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      An incompatible topology is possible beginning in 1.9.0 when we bump our min wire version to 2 (dropping support for MongoDB 2.4 and older).

      We have a risky convention throughout our code that bson_error_t pointers can be NULL, which sometimes bites us. There was a latent bug in mongoc_topology_compatible that tried to memcpy topology->compatibility_error to the bson_error_t out-pointer even if the latter was NULL, fixed as part of CDRIVER-2270. Write a test to prevent regression.

              Assignee:
              A. Jesse Jiryu Davis
              Reporter:
              A. Jesse Jiryu Davis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: