Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for 32bit windows with MSVC. #311

Merged
merged 3 commits into from
May 6, 2024
Merged

Conversation

DelSkayn
Copy link
Owner

@DelSkayn DelSkayn commented May 3, 2024

Turns out alignment on i686 MSVC is basically broken right now as MSVC is inconsistent.
A 64bit integer on i686 can have a 4 byte alignment when clang and rust assume it is 8. This causes slice::from_raw_parts to panic since it will see 4 byte aligned values originating from the stack as misaligned.

For more info see rust-lang/rust#112480.

This makes is basically impossible to correctly call QuickJS functions on that platform. Any pointer returned from QuickJS might be misaligned according Clang. Working around this would be a lot of work for a quite old platform which could still be supported with a different toolchain. So I opted to drop support for i686 MSVC.

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.31%. Comparing base (613b82a) to head (aca7969).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #311   +/-   ##
=======================================
  Coverage   68.31%   68.31%           
=======================================
  Files          83       83           
  Lines       12237    12237           
=======================================
  Hits         8360     8360           
  Misses       3877     3877           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DelSkayn DelSkayn force-pushed the fix-unsafe-precoditions branch 2 times, most recently from 0b46ca9 to 06db4d1 Compare May 3, 2024 16:58
@DelSkayn DelSkayn changed the title Fix MSVC slice preconditions Work around alignment issues on i686 MSVC May 3, 2024
@DelSkayn DelSkayn force-pushed the fix-unsafe-precoditions branch from 06db4d1 to 115462c Compare May 3, 2024 17:57
@DelSkayn DelSkayn changed the title Work around alignment issues on i686 MSVC Drop support for 32bit windows with MSVC. May 6, 2024
@DelSkayn DelSkayn marked this pull request as ready for review May 6, 2024 09:40
@DelSkayn DelSkayn merged commit 6b82e33 into master May 6, 2024
27 checks passed
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.

2 participants