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 ConcurrentModificationException when calling SootClass.getMethods… #2043

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

buriedpot
Copy link

Issue #2024

@StevenArzt
Copy link
Contributor

Your merge request seems inconsistent with the issue #2024. The synchronization will only help in a multithreaded context, and only if the other operations that modify the collection are also synchronized. I don't see that this is the case. I rather assume that the overhead introduced by the synchronization fixes some weird timing issue by chance. If that's correct, the problem remains. Further, everyone pays for the overhead of synchronization. In total, I'm not really happy with this fix suggestion.

@buriedpot
Copy link
Author

Can you review my newest commit fb376b8, thank you!

@buriedpot
Copy link
Author

Your merge request seems inconsistent with the issue #2024. The synchronization will only help in a multithreaded context, and only if the other operations that modify the collection are also synchronized. I don't see that this is the case. I rather assume that the overhead introduced by the synchronization fixes some weird timing issue by chance. If that's correct, the problem remains. Further, everyone pays for the overhead of synchronization. In total, I'm not really happy with this fix suggestion.

Can you review my newest commit fb376b8, thank you!

Can you review my newest commit fb376b8, thank you!

@StevenArzt
Copy link
Contributor

The copy constructor internally just iterates over the incoming list. You can just have the ConcurrentModificationException inside the constructor if you're unlucky. A real fix would need to make the data structures concurrent, which is a major undertaking.

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