Add leak detection on bson_t

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.10.0
    • Affects Version/s: None
    • Component/s: libbson
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      There have been a few recent cases seen where we have not been properly cleaning up after initializing bson_t (see CDRIVER-2308). There may be some additional cases where we aren't cleaning up a bson_t, but it isn't showing up in valgrind because it isn't spilling over to the heap. To prevent this from happening again, we should add a compile flag to enforce every bson_init and BSON_INITIALIZER allocates memory. This should help us discover misuse of bson_t's, and will prevent real memory leaks from happening when they do spill over. We should add a flag in cmake and our autoconf configuration to enable this.

            Assignee:
            Xiangyu Yao (Inactive)
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: