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

Problem: mtrie use of non-tail recursion leads to stack overflow #3959

Merged
merged 2 commits into from
Jun 17, 2020

Conversation

bluca
Copy link
Member

@bluca bluca commented Jun 16, 2020

No description provided.

Solution: only process for sub/cancel if the messages are actually sub/cancel.
Regression introduced by cf9ccbb which tried to skip non-sub/cancel processing
for PUB.
Solution: convert add and rm functions to iterative algorithms
@bluca
Copy link
Member Author

bluca commented Jun 17, 2020

@somdoron could you have a look when you got a second, please

@somdoron
Copy link
Member

Looks good, by the way, it seems the add was tail recursive, was it a problem as well?

@bluca
Copy link
Member Author

bluca commented Jun 17, 2020

Looks good, by the way, it seems the add was tail recursive, was it a problem as well?

It is in case the compiler doesn't optimize it away, so we can't be 100% sure on our end, so I changed it too

@somdoron somdoron merged commit 522abc7 into zeromq:master Jun 17, 2020
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.

2 participants