Skip to content

Make ReferenceStorage(T) non-atomic if T is non-atomic#14730

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
HertzDevil:bug/reference-storage-atomic
Jun 22, 2024
Merged

Make ReferenceStorage(T) non-atomic if T is non-atomic#14730
straight-shoota merged 2 commits intocrystal-lang:masterfrom
HertzDevil:bug/reference-storage-atomic

Conversation

@HertzDevil
Copy link
Contributor

Fixes #14692.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib topic:compiler:codegen labels Jun 19, 2024
@straight-shoota straight-shoota added this to the 1.13.0 milestone Jun 19, 2024
@straight-shoota
Copy link
Member

We need to skip the spec on the interpreter.

@straight-shoota straight-shoota merged commit 4f31615 into crystal-lang:master Jun 22, 2024
@HertzDevil HertzDevil deleted the bug/reference-storage-atomic branch June 26, 2024 12:31
straight-shoota pushed a commit that referenced this pull request Aug 6, 2024
It turns out the fix in #14730 made all `ReferenceStorage` objects non-atomic; `Crystal::ReferenceStorageType#reference_type` returns a reference type, whose `#has_inner_pointers?` always returns true since the reference itself is a pointer.
This PR fixes that again by adding a special case for `ReferenceStorage`.
straight-shoota pushed a commit that referenced this pull request Aug 20, 2024
It turns out the fix in #14730 made all `ReferenceStorage` objects non-atomic; `Crystal::ReferenceStorageType#reference_type` returns a reference type, whose `#has_inner_pointers?` always returns true since the reference itself is a pointer.
This PR fixes that again by adding a special case for `ReferenceStorage`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen topic:stdlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReferenceStorage(T) is always atomic even when T isn't

3 participants