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

Make Utf8Utils thread-safe #5

Merged
merged 1 commit into from Feb 15, 2013

Conversation

psm14
Copy link
Contributor

@psm14 psm14 commented Jan 11, 2013

Utf8Utils holds a static character buffer that it uses while parsing strings, which unfortunately causes issues when multiple threads are trying to instantiate DexFile. Although it is somewhat hackish, this commit works around the issue while still avoiding an allocation on every call by making the buffer a field of ByteArrayInput and passing that into utf8BytesToString().

JesusFreke added a commit that referenced this pull request Feb 15, 2013
@JesusFreke JesusFreke merged commit 0c838af into JesusFreke:master Feb 15, 2013
@JesusFreke
Copy link
Owner

Thanks for the patch. Sorry it took so long to look at/accept it :)

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.

None yet

2 participants