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 2.13.7 releaseFence regression affecting GraalVM compatibility #9825

Merged
merged 1 commit into from Dec 10, 2021

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Dec 9, 2021

Don't emit releaseFence for class params of specialized classes

Non-specialized val fields in a specialized class are made non-final
because of the way specialization is encoded. A releaseFence call
is added to the constructor to ensure safe publication.

The releaseFence call is not necessary for class parameters as those
remain final.

Follow-up for #9704, fixes scala/bug#12500

Non-specialized val fields in a specialized class are made non-final
because of the way specialization is encoded. A `releaseFence` call
is added to the constructor to ensure safe publication.

The releaseFence call is not necessary for class parameters as those
remain final.

Follow-up for scala#9704, fixes scala/bug#12500
@lrytz lrytz requested a review from joroKr21 December 9, 2021 18:29
@scala-jenkins scala-jenkins added this to the 2.13.8 milestone Dec 9, 2021
Copy link
Member

@joroKr21 joroKr21 left a comment

Choose a reason for hiding this comment

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

What a nice fix 👍 It's always tricky with all the semantics a ValDef can have 😄

@lrytz lrytz merged commit 6ca41af into scala:2.13.x Dec 10, 2021
@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Dec 15, 2021
@SethTisue SethTisue changed the title Don't emit releaseFence for class params of specialized classes Fix 2.13.7 releaseFence regression affecting GraalVM compatibility Dec 18, 2021
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