Skip to content

linker __rust_probestack fix#37

Closed
andrei-marinica wants to merge 1 commit into
feat/wasmer2.2from
probestack-fix
Closed

linker __rust_probestack fix#37
andrei-marinica wants to merge 1 commit into
feat/wasmer2.2from
probestack-fix

Conversation

@andrei-marinica
Copy link
Copy Markdown

Fixed the linker issue on Linux, related to probestack.

This issue appears for Rust compilers newer than 1.89, and was fixed in Wasmer 6.1.0.

Copy link
Copy Markdown

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 updates the Rust toolchain from version 1.59 to 1.90 and fixes a linker issue related to __rust_probestack on Linux that appeared in Rust compilers newer than 1.89. The fix involves conditionally including a custom probestack implementation when the Rust standard library doesn't provide __rust_probestack.

Changes:

  • Updated Rust toolchain to version 1.90
  • Added build-time detection for missing __rust_probestack using rustversion crate
  • Included fallback probestack implementation from rust-lang/compiler-builtins

Reviewed changes

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

Show a summary per file
File Description
rust-toolchain Updated Rust version from 1.59 to 1.90
lib/vm/build.rs New build script that conditionally sets missing_rust_probestack cfg flag for Rust >= 1.89
lib/vm/Cargo.toml Added rustversion 1.0 build dependency
lib/vm/src/probestack/mod.rs Added conditional compilation logic to use custom probestack when needed
lib/vm/src/probestack/compiler_builtins.rs New file containing probestack implementation from rust-lang/compiler-builtins
Cargo.lock Updated dependencies including rustversion and many transitive dependency updates
Comments suppressed due to low confidence (1)

lib/vm/src/probestack/mod.rs:75

  • The nested cfg_if blocks with redundant conditions create unnecessary complexity. The inner cfg_if at line 63 checks for not(missing_rust_probestack) and missing_rust_probestack when these are mutually exclusive. This could be simplified by removing the nested cfg_if and using a single if-else construct, or by ensuring better organization of the conditional compilation logic.

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

@andrei-marinica
Copy link
Copy Markdown
Author

Branched off from the wrong place. The correct PR is: #38

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