crclark / foundationdb-haskell

Haskell FFI bindings to the FoundationDB C API
https://crclark.github.io/foundationdb-haskell/
BSD 3-Clause "New" or "Revised" License
36 stars 5 forks source link

Investigate tuple encoding bug #12

Closed crclark closed 5 years ago

crclark commented 5 years ago

Our implementation used the Python implementation of the tuple layer as a reference to check encoding correctness.

https://forums.foundationdb.org/t/request-for-feedback-tuple-encoding-bug/936

crclark commented 5 years ago

2 ^ 64 - 1 is encoded in our implementation and in Python as "\x1d\x08\xff\xff\xff\xff\xff\xff\xff\xff" when it should be encoded as "\x1c\xff\xff\xff\xff\xff\xff\xff\xff". Its predecessor is correctly encoded as "\x1c\xff\xff\xff\xff\xff\xff\xff\xfe".