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

Add extra validation to compilers & engines #2693

Merged
merged 7 commits into from Nov 23, 2021
Merged

Add extra validation to compilers & engines #2693

merged 7 commits into from Nov 23, 2021

Conversation

Amanieu
Copy link
Contributor

@Amanieu Amanieu commented Nov 23, 2021

  • Cranelift and singlepass now properly cross-compile with no dependency on the host target.
  • Staticlib engine now panics if you try to run a freshly compiled module.
  • CPU features used when a module was compiled are now checked against the host CPU features during instantiation.

Fixes #1567
Fixes #2590

&& matches!(
target.triple().architecture,
Architecture::X86_32(_) | Architecture::X86_64
) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this code will not work on 32bits x86. the ff 25 00 00 00 00 translate to jmp [0x00000000].
Or the offset needs to be 2 instead of 6 in 32bits

@ptitSeb
Copy link
Contributor

ptitSeb commented Nov 23, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 23, 2021

@bors bors bot merged commit 8f2e49d into master Nov 23, 2021
@bors bors bot deleted the cpu_features branch November 23, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants