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

fix(server): Reset interpreter stack on errors #745

Merged
merged 2 commits into from
Feb 2, 2023

Conversation

dranikpg
Copy link
Contributor

@dranikpg dranikpg commented Feb 2, 2023

Fixes #742

@dranikpg dranikpg requested a review from romange February 2, 2023 11:03
@romange
Copy link
Collaborator

romange commented Feb 2, 2023

please add unit test

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Comment on lines +904 to +907
for (int i = 0; i < 3'000; i++) {
Run({"EVAL", "redis.get(KEYS[1], KEYS[2], KEYS[3], KEYS[4], KEYS[5])", "5", "k1", "k2", "k3",
"k4", "k5"});
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I experimentally determined this is the min amount to make it fail. We need to pollute the stack largely enough

@romange romange merged commit ee11376 into dragonflydb:main Feb 2, 2023
ashotland pushed a commit that referenced this pull request Feb 2, 2023
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
@dranikpg dranikpg deleted the fix-interpreter branch February 27, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gracefully handle errors in lua scripts
2 participants