-
Notifications
You must be signed in to change notification settings - Fork 9
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
ibuf: don't clash with tarantool's ibuf_*() symbols #111
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0d47862
to
e8ea5c3
Compare
I want to proceed with it after PR #102. |
ligurio
suggested changes
Mar 29, 2022
ligurio
approved these changes
Mar 29, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I'm ok.
LGTM
e8ea5c3
to
33912be
Compare
Just copy and change includes. It is necessary to change function names in a next commit. The source is the small version, which is bundled into the module: 1.1-63-g3df5050. Part of #59
Part of #59
See [1] for the problem root and [2] for analysis. In brief: `ibuf_*()` symbols may clash with the same named symbols in tarantool, so it worth to rename them to avoid effects of different binary layouts: assertion fails and memory corruptions. For example, `ibuf_reserve_slow()` calls `slab_get()` and `slab_put()`. If something will be changed in tarantool's slab cache, we can meet problems in the module. This patch just renames the `ibuf_*()` functions. It is the most simple and durable workaround of the problem. It is likely not necessary to rename inline functions, but since I'm not dead sure, I renamed them all. It is the last known problem from #59. All others are confirmed as safe to ignore if we'll keep current libsmall version in the module (see the analysis in [2]). [1]: tarantool/tarantool#6873 [2]: #59 (comment) Fixes #59
I wrote it mainly to clarify when the hack could be removed. Follows up #59
33912be
to
50ce479
Compare
Rebased after PR #102. |
LeonidVas
approved these changes
Apr 27, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Copy
ibuf.c
andibuf.h
from small into the module's code and rename the functions tomemcached_ibuf_*()
.See tarantool/tarantool#6873 for the root problem and #59 (comment) for analysis.
ibuf_*()
symbols may clash with the same named symbols in tarantool, so it worth to rename them to avoid effects of different binary layouts: assertion fails and memory corruptions.It is the last known problem from #59. All others are confirmed as safe to ignore if we'll keep current libsmall version in the module (see the issue).
More details can be found in the commit messages.
Fixes #59