Skip to content

Fix undefined behavior in interpreter mixed union upcast#15042

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:bug/interpreter-mixed-union-upcast
Sep 28, 2024
Merged

Fix undefined behavior in interpreter mixed union upcast#15042
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:bug/interpreter-mixed-union-upcast

Conversation

@HertzDevil
Copy link
Contributor

Fixes #15041.

It also changes the move_to in the tuple indexers to move_from, although in practice these don't exhibit unexpected behavior, because most memcpy implementations copy data from lower addresses to higher addresses, and these calls move data to a lower address.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:interpreter labels Sep 26, 2024
@straight-shoota straight-shoota added this to the 1.14.0 milestone Sep 27, 2024
@straight-shoota straight-shoota merged commit 7aeba1e into crystal-lang:master Sep 28, 2024
@HertzDevil HertzDevil deleted the bug/interpreter-mixed-union-upcast branch October 2, 2024 05:35
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:interpreter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mixed union upcast is broken in interpreter on Alpine Linux

4 participants