Skip to content

llvm: fix load of packed struct that was initialized through pointers#16605

Closed
jacobly0 wants to merge 1 commit intoziglang:masterfrom
jacobly0:struct-field
Closed

llvm: fix load of packed struct that was initialized through pointers#16605
jacobly0 wants to merge 1 commit intoziglang:masterfrom
jacobly0:struct-field

Conversation

@jacobly0
Copy link
Copy Markdown
Member

@jacobly0 jacobly0 commented Jul 29, 2023

It's possible that the isAbiInt condition could be relaxed to containerLayout == .Packed, but this seems safer for now.

Blocked by llvm/llvm-project#64222
Closes #14200

@andrewrk
Copy link
Copy Markdown
Member

andrewrk commented Aug 1, 2023

It looks like that issue is not going to be fixed with LLVM 17. I think we must choose one of these options:

@jacobly0
Copy link
Copy Markdown
Member Author

jacobly0 commented Aug 1, 2023

For the second one, the options I see are:

  • Try reducing the scope to only packed structs, and hope it regresses something slightly less than literally everything targetting wasm.
  • Do not apply this bugfix when targetting wasm, wasm would continue to have an obscure packed struct miscompilation, but it would be way better than every + miscompiling.

@andrewrk
Copy link
Copy Markdown
Member

Landed in aaf4618 as part of #17391.

@andrewrk andrewrk closed this Oct 10, 2023
@jacobly0 jacobly0 deleted the struct-field branch October 20, 2023 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A packed struct member of a struct isn't equal to itself.

2 participants