Review and fix WT_ASSERTs in packing_inline.h

XMLWordPrintableJSON

    • Storage Engines, Storage Engines - Transactions
    • SE Transactions - 2025-07-18
    • 3

      Some asserts in packing_inline.h can cause the whole program to crash (if WT_ASSERT is enabled) or ignore an error (if WT_ASSERT is disabled).

      In particular, WT_ASSERT(session, p <= end) in __wt_struct_unpackv() can cause a wrong behavior on incorrect input. It must be a run-time check returning an error rather than an "assert".

      Other uses of WT_ASSERT in this file should be reviewed too. Since these functions work with user-supplied input, they must handle garbage input appropriately.

              Assignee:
              Alana Huang
              Reporter:
              Yury Ershov
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: