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: concurrent access may cause an java.lang.ClassCastException #864

Merged
merged 1 commit into from Feb 23, 2020

Conversation

jpstotz
Copy link
Collaborator

@jpstotz jpstotz commented Feb 23, 2020

By chance I encountered in the Jadx log several java.lang.ClassCastException java.util.HashMap$Node cannot be cast to java.util.HashMap$TreeNode in JNodeCache.makeFrom().

Based on some research this can happen in case the HashMap is accesses concurrently.
This seem to happen very very rarely as I wasn't able to reproduce this Exception in my further tests.

Nevertheless one time if failed and therefore I would suggest to better to use a ConcurrentHashMap for the JNodeCache.

@skylot skylot merged commit 4520747 into skylot:master Feb 23, 2020
@jpstotz jpstotz deleted the jnodecache_concurrency branch February 23, 2020 14:07
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