Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2322

Add leak detection on bson_t

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 1.10.0
    • None
    • libbson
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Activity

          People

            xiangyu.yao@mongodb.com Xiangyu Yao (Inactive)
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: