-
Notifications
You must be signed in to change notification settings - Fork 386
error: use int64_t as reference counter #5018
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
Conversation
Should I send the PR to mailing list? |
I will take a look here. |
Typo: 'increment' -> 'increments'. Also in the commit message we describe the old behaviour using past tense. You said "any of them now can throw", but you should say "any of them could throw". |
Before it was unsafe to use error.prev, box.error.last(), or any error method that increments error reference counter. Any of them could throw a Lua error in case of INT32_MAX overflow. This patch uses int64_t as error reference counter making it impossible to get counter overflow. Closes tarantool#4902
d25d373
to
c4f0862
Compare
Thanks, @Gerold103, for review! I fixed the issues. |
You may need a second review, and someone who will merge. @kyukhin probably. |
Could you please send your final patch to tarantool-patches mailing list? |
done |
It was pushed as 2.5.0-129-g2e3c81dee to @kyukhin I updated drafts of 2.5.1 and 2.4.2 release notes. |
Before it was unsafe to use error.prev, box.error.last(), or any error
method that increment error reference counter. Any of them can throw
a Lua error in case of INT32_MAX overflow.
This patch uses int64_t as error reference counter making it impossible
to get counter overflow.
Closes #4902
Unfortunately I don't know how to write tests on this behaviour..