Make InstructionTranslator non-copyable - #209
Merged
Merged
Conversation
MaxDesiatov
force-pushed
the
maxd/noncopyable-translator
branch
from
October 20, 2025 14:05
a0cd63c to
f702339
Compare
Member
Author
|
Only builds with |
Member
|
Very concerning that the ASan fuzz detected invalid memory access 🤔 https://github.com/swiftwasm/WasmKit/actions/runs/18654651206/job/53180660404?pr=209 |
Member
|
If I'm not mistaken, it seems like the SIL code tries to destroy struct members twice when an Error is thrown during the translator init. |
MaxDesiatov
marked this pull request as draft
October 21, 2025 15:28
MaxDesiatov
force-pushed
the
maxd/noncopyable-translator
branch
2 times, most recently
from
June 17, 2026 11:45
fce1011 to
b1539c1
Compare
MaxDesiatov
added a commit
that referenced
this pull request
Jun 17, 2026
As uncovered by #209 in fuzzing CI jobs, Swift 6.2 and earlier versions miscompile certain uses of `~Copyable`. The miscompile is fixed in 6.3, but we should not be supporting versions where miscompiles can't be fixed. With 6.3 already released and 6.4 branched, bumping to 6.3 lands roughly within the existing declared WasmKit's MSSV policy, depending on when next WasmKit is going to be tagged. If at the time of WasmKit's release Swift 6.4 is not available, temporarily shorter MSSV window is still worth it for avoiding miscompiles.
Merged
MaxDesiatov
added a commit
that referenced
this pull request
Jun 18, 2026
As uncovered by #209 in fuzzing CI jobs, Swift 6.2 and earlier versions miscompile certain uses of `~Copyable`. The miscompile is fixed in 6.3, but we should not be supporting versions where miscompiles can't be fixed. With 6.3 already released and 6.4 branched, bumping to 6.3 lands roughly within the existing declared WasmKit's MSSV policy, depending on when next WasmKit is going to be tagged. If at the time of WasmKit's release Swift 6.4 is not available, temporarily shorter MSSV window is still worth it for avoiding miscompiles.
MaxDesiatov
force-pushed
the
maxd/noncopyable-translator
branch
from
June 18, 2026 11:38
b1539c1 to
a5c30f5
Compare
MaxDesiatov
marked this pull request as ready for review
June 18, 2026 11:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This avoids unintentional possible ARC traffic if
InstructionTranslatoris accidentally copied, as it stores references to classes likeISeqAllocator.