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

Java binding doesn't encode the integer 8256 correctly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.7.0
    • Labels:
      None

      Description

      Since 2.5.0, the C library makes a special case for encoding the integer value "8256" which is (2^13 + 2^16). The java library doesn't make the same special case, so it is possible to corrupt the database state by writing that value into it (see attached test case).

      Were there and special precautions that WiredTiger takes when upgrading versions that going from 2.4 -> 2.5 re-encoded any values that changed? How would similar encoding changes in the future be handled?

      Why doesn't the java binding use the C wiredtiger_struct_pack instead of reimplementing the same algorithm? At a very quick glance it looks like the python binding does the same thing, so it is likely similarly affected.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                donald.anderson Donald Anderson
                Reporter:
                grogers Greg Rogers
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: