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

Change utf8 decoder to be iterative and not overflow the call stack #1136

Closed

Conversation

deongroenewald
Copy link

@deongroenewald deongroenewald commented Nov 20, 2022

I was getting errors similar to #918 and #922 (converting a rust lib to WASM) and noted that the stack was overflowing due to the recursion in the _decode() function of the utf8 package.

Changing the implementation to be iterative resolved these errors for me.

@deongroenewald deongroenewald changed the title Change utf8 decoder to be iterative and not overflow the stack stack Change utf8 decoder to be iterative and not overflow the call stack Nov 20, 2022
@xtuc
Copy link
Owner

xtuc commented Nov 24, 2022

Nice, thanks for the change. I'll have a look.

@xtuc xtuc self-requested a review November 24, 2022 09:53
@deongroenewald
Copy link
Author

Closing since #1140 has been merged.

@deongroenewald deongroenewald deleted the iterative-utf8-decode branch December 22, 2023 18:18
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