Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-1879

bug in config subcategory usage

    • Type: Icon: Task Task
    • Resolution: Done
    • WT2.6.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      I came across a problem with the way we generate structures for subcategories the other day. I encountered it with our new encryption category. For our example, we have an encryption subcategory available on both wiredtiger_open (i.e. defined in the connection_runtime_config area of api_data.py) and WT_SESSION::create (defined in file_config).

      In our example, the WT_SESSION::create definition had 2 items, name and keyid. The definition for wiredtiger_open had 3 items, name, keyid and passwd. (In this case the two categories overlap, but one could easily imagine a generically named category used multiple times that may not overlap.)

      When running the scripts, the definition for WT_SESSION::create is the one that "wins" and we end up with a structure that looks like:

      static const WT_CONFIG_CHECK confchk_encryption_subconfigs[] = {
              { "keyid", "string", NULL, NULL, NULL, 0 },
              { "name", "string", NULL, NULL, NULL, 0 },
              { NULL, NULL, NULL, NULL, NULL, 0 }
      };
      

      Then when passwd is used in wiredtiger_open we segfault.

      I'm able to make progress by simply changing the category name in WT_SESSION::create.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            sue.loverso@mongodb.com Susan LoVerso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: