Skip to content

Conversation

@mkeeter
Copy link
Owner

@mkeeter mkeeter commented Jan 26, 2026

Workaround for rust-lang/rust-clippy#16467 and rust-lang/rust-clippy#16182

Tweaks to x86 JIT, due to weird failures (Windows only after the rustc update). I think writing the simplify flag with

mov r8w, 1
mov [rdx], r8w

caused a 2-byte write to a 1-byte field, and we were just getting lucky earlier.

@mkeeter mkeeter marked this pull request as draft January 26, 2026 17:33
@mkeeter mkeeter mentioned this pull request Jan 26, 2026
@mkeeter mkeeter marked this pull request as ready for review January 26, 2026 17:54
@mkeeter mkeeter requested a review from Copilot January 26, 2026 17:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR contains fixes for compatibility with rustc 1.92, addressing both clippy false positives and a subtle bug in x86_64 JIT assembly code.

Changes:

  • Fixed x86_64 JIT assembly to use byte-sized memory operations instead of incorrectly writing 16-bit values to 8-bit fields
  • Updated AVX cleanup code to use vzeroupper instead of the incorrect combination of emms and vzeroall
  • Added clippy suppression attributes to work around known false positives in rustc 1.92

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
fidget-jit/src/x86_64/interval.rs Fixed memory write bugs by changing from 16-bit register operations (ax, r8w) with i16 casts to direct byte-sized memory operations with i8 casts for both choice flags and simplify flag
fidget-jit/src/lib.rs Replaced emms + vzeroall with proper vzeroupper instruction for AVX state cleanup on function exit
fidget-core/src/render/mod.rs Added clippy suppressions for panicking_unwrap and unnecessary_unwrap false positives in rustc 1.92 (issues #16467 and #16182)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkeeter mkeeter merged commit 2a9efe3 into main Jan 26, 2026
19 checks passed
@mkeeter mkeeter deleted the rustc-fixes branch January 26, 2026 18:03
@mkeeter mkeeter mentioned this pull request Jan 27, 2026
mkeeter added a commit that referenced this pull request Jan 27, 2026
The memory corruption in #386 is significant enough to warrant a
release.
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.

1 participant