Initialize handle_general to nullptr

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Fully Compatible
    • Programmability 2025-12-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I found this issue experimenting with the `ftrivial-auto-var-init=pattern` compile flag. `keystoreEventHandlers()` returns a `WT_EVENT_HANDLER*` but leaves the `handle_general` member uninitialized. This `WT_EVENT_HANDLER*` eventually gets passed to `wiredtiger_open`, which has a check like `if (event_handler != NULL && event_handler>handle_general != NULL)` before calling `handle_general`. If `handle_general` doesn't happen to get zero-initialized, this can crash. This change explicitly initializes it to `nullptr` to avoid that.

            Assignee:
            Ryan Berryhill
            Reporter:
            Ryan Berryhill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: