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

BCON_NEW segfault with 3 items in list

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 1.3.3
    • libbson
    • RHEL7

    Description

          bson_t * query;
          query = BCON_NEW("$and","[",
                                       "{", "a", BCON_INT32(1), "}",
                                       "{", "b", "{", "$gte", BCON_INT32(1), "}", "}",
                                       "{", "b", "{", "$lt", BCON_INT32(3), "}", "}",
                                   "]");
          //prove it looks right
          size_t *s;
          const char * as_json;
          as_json = bson_as_json(query, s);
      

      crashes on bson_as_json call.

      Comment out any single one of the 3 documents in the and list and it works fine.

      Attachments

        Activity

          People

            jesse@mongodb.com A. Jesse Jiryu Davis
            bauman Dan Bauman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: