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

A pair of thread safety fixes for runtime reflection. #8396

Merged

Conversation

retronym
Copy link
Member

@retronym retronym commented Sep 4, 2019

No description provided.

@scala-jenkins scala-jenkins added this to the 2.12.11 milestone Sep 4, 2019
@retronym retronym modified the milestones: 2.12.11, 2.12.10 Sep 4, 2019
@retronym
Copy link
Member Author

retronym commented Sep 4, 2019

I think this is worthwhile and low risk for 2.12.10, so setting that milestone.

The stack trace in a customer's bug report suggests that
we need this to avoid races between these methods of
`TypeSymbol`.

```
    private def setTyconCache(tycon: Type) {
      tyconCache = tycon
      tyconRunId = currentRunId
      assert(tyconCache ne null, this)
    }
```

```
    override def info_=(tp: Type) {
      tpePeriod = NoPeriod
      tyconCache = null
      super.info_=(tp)
    }
```
Disable the cache of the `SubstMap` used in `Type.subst` when
in the runtime reflection universe.
@retronym retronym force-pushed the topic/reflection-thread-safety-tycon branch from 6f81450 to 67e4d95 Compare September 4, 2019 02:26
@adriaanm adriaanm merged commit 61701c2 into scala:2.12.x Sep 4, 2019
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
4 participants