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 thread safety problem in runtime reflection #9080

Merged
merged 2 commits into from Jun 24, 2020

Conversation

retronym
Copy link
Member

In #9012, a ReusableInstance was added in the implenentation of
TypeConstraint.contains. This needs to be disabled in the
multi-threaded runtime reflection universe.

In scala#9012, a `ReusableInstance` was added in the implenentation of
`TypeConstraint.contains`. This needs to be disabled in the
multi-threaded runtime reflection universe.
@scala-jenkins scala-jenkins added this to the 2.13.4 milestone Jun 24, 2020
@retronym
Copy link
Member Author

/synch

Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Do you want to backport this to 2.12.12?

@lrytz lrytz merged commit d175aec into scala:2.13.x Jun 24, 2020
@retronym
Copy link
Member Author

Backport in #9087.

The spot that actually triggered the failure (TypeConstraint.containsSymbol) was a 2.13.x-only problem, but the defensive move of disabling all the ReusableInstance-s in runtime reflection makes sense in 2.13.x in case our reasoning about which code paths are reachable in that use case were wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants