Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PutMulti incorrectly panics when passed an empty page #106

Open
bmatsuo opened this issue Feb 13, 2017 · 0 comments
Open

PutMulti incorrectly panics when passed an empty page #106

bmatsuo opened this issue Feb 13, 2017 · 0 comments
Labels

Comments

@bmatsuo
Copy link
Owner

bmatsuo commented Feb 13, 2017

The lmdb package has to adjust empty inputs to allow CGO calls to succeed in the general case. But this adjustment causes Cursor.PutMulti to panic when it tries to validate the consistency of its arguments.

Unfortunately, in the current release of LMDB fixing this bug would only cause LMDB to segfault moments later. But once this bug in LMDB is fixed this bug should be addressed.

Note that the plan in #99 is to introduce new function for writing Multiple values. This function will not have the bug. This means that it will probably segfault with a nil-pointer reference until an fix for LMDB is released, or until a fix can be confirmed so much that it can be emulated.

The fix in LMDB will likely trigger an EINVAL error in these cases, which would not be hard to emulate. It is just a matter of making sure the LMDB folks have committed to this.

@bmatsuo bmatsuo added the bug label Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant