linker fix for linux - __rust_probestack#38
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request addresses a linker issue on Linux related to __rust_probestack that affects Rust compilers newer than version 1.89. The fix was already implemented in Wasmer 6.1.0 and is being backported here.
Changes:
- Updates Rust toolchain from 1.56 to 1.90
- Adds
rustversionbuild dependency for version-conditional compilation - Implements custom
__rust_probestackfunction when missing from newer Rust versions - Updates all dependencies in Cargo.lock
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rust-toolchain | Updates Rust version from 1.56 to 1.90 |
| lib/vm/Cargo.toml | Adds rustversion 1.0 as build dependency |
| lib/vm/build.rs | Adds version-conditional cfg for missing_rust_probestack |
| lib/vm/src/probestack/mod.rs | Adds conditional compilation logic to use custom or built-in probestack |
| lib/vm/src/probestack/compiler_builtins.rs | New file containing probestack implementation from compiler-builtins crate |
| Cargo.lock | Updates all dependencies to newer versions |
Comments suppressed due to low confidence (1)
lib/vm/src/probestack/mod.rs:73
- The nested
cfg_ifblock has redundant conditions. Line 64 checks fornot(missing_rust_probestack)and line 70 checks formissing_rust_probestack. Since these are mutually exclusive and exhaustive, the second condition on line 70 is redundant and can be replaced with justelsewithout theelse if #[cfg(missing_rust_probestack)]part.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .compile("handlers"); | ||
| } | ||
|
|
||
| #[rustversion::since(1.89)] |
There was a problem hiding this comment.
The PR description states that this issue appears for Rust compilers newer than 1.89, but the conditional compilation in the build script sets missing_rust_probestack for versions since 1.89 (i.e., 1.89 and later). This means version 1.89 itself is treated as having the missing probestack issue. Please verify if the issue starts at 1.89 or after 1.89. If the issue only affects versions after 1.89, the attribute should be #[rustversion::after(1.89)] instead of #[rustversion::since(1.89)].
| #[rustversion::since(1.89)] | |
| #[rustversion::after(1.89)] |
| @@ -1 +1 @@ | |||
| 1.56 | |||
| 1.90 | |||
There was a problem hiding this comment.
The Rust version is being updated from 1.56 to 1.90, which is a significant jump. This is a major version upgrade that may introduce breaking changes or require other parts of the codebase to be updated. Please ensure that all code compiles and all tests pass with Rust 1.90, and consider documenting this version requirement change in the project's release notes or changelog.
| 1.90 | |
| [toolchain] | |
| channel = "1.90.0" |
There was a problem hiding this comment.
It was tested. We will be migrating to wasmer 6+, this repo is in maintenance mode, hence no major code update will be done.
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.