Skip to content

Fix misaligned store in Bool to union upcasts#14906

Merged
straight-shoota merged 3 commits intocrystal-lang:masterfrom
HertzDevil:bug/bool-to-union-upcast-align
Aug 15, 2024
Merged

Fix misaligned store in Bool to union upcasts#14906
straight-shoota merged 3 commits intocrystal-lang:masterfrom
HertzDevil:bug/bool-to-union-upcast-align

Conversation

@HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Aug 14, 2024

Fixes #14898.

The code path for Nil looks similar, but it is perfectly fine: it directly stores [8 x i64] zeroinitializer to the data field, whose default alignment naturally matches.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen kind:regression Something that used to correctly work but no longer works labels Aug 14, 2024
@straight-shoota straight-shoota added this to the 1.14.0 milestone Aug 14, 2024
@straight-shoota straight-shoota modified the milestones: 1.14.0, 1.13.2 Aug 15, 2024
@straight-shoota straight-shoota merged commit f451be6 into crystal-lang:master Aug 15, 2024
@straight-shoota straight-shoota removed the kind:regression Something that used to correctly work but no longer works label Aug 15, 2024
straight-shoota pushed a commit that referenced this pull request Aug 20, 2024
The code path for `Nil` looks similar, but it is perfectly fine: it directly stores `[8 x i64] zeroinitializer` to the data field, whose default alignment naturally matches.
@crysbot
Copy link
Collaborator

crysbot commented Aug 21, 2024

This pull request has been mentioned on Crystal Forum. There might be relevant details there:

https://forum.crystal-lang.org/t/crystal-1-13-2-is-released/7110/1

@HertzDevil HertzDevil deleted the bug/bool-to-union-upcast-align branch August 25, 2024 02:31
@crysbot
Copy link
Collaborator

crysbot commented Aug 28, 2024

This pull request has been mentioned on Crystal Forum. There might be relevant details there:

https://forum.crystal-lang.org/t/invalid-memory-access-signal-11-on-1-13-1-not-present-on-1-12-2/7051/6

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid memory access in release mode with LLVM 18

4 participants