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.
- related to
-
WT-1882 Generated tables for config subcategories are qualified by referencing method name.
- Closed