Skip to content

linker fix for linux - __rust_probestack#38

Merged
andrei-marinica merged 2 commits into
feat/wasmer2from
probestack-build-fix
Jan 20, 2026
Merged

linker fix for linux - __rust_probestack#38
andrei-marinica merged 2 commits into
feat/wasmer2from
probestack-build-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 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 rustversion build dependency for version-conditional compilation
  • Implements custom __rust_probestack function 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_if block has redundant conditions. Line 64 checks for not(missing_rust_probestack) and line 70 checks for missing_rust_probestack. Since these are mutually exclusive and exhaustive, the second condition on line 70 is redundant and can be replaced with just else without the else if #[cfg(missing_rust_probestack)] part.

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

Comment thread lib/vm/build.rs
.compile("handlers");
}

#[rustversion::since(1.89)]
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

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)].

Suggested change
#[rustversion::since(1.89)]
#[rustversion::after(1.89)]

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, it is tested.

Comment thread rust-toolchain
@@ -1 +1 @@
1.56
1.90
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
1.90
[toolchain]
channel = "1.90.0"

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It was tested. We will be migrating to wasmer 6+, this repo is in maintenance mode, hence no major code update will be done.

@andrei-marinica andrei-marinica merged commit 73f2111 into feat/wasmer2 Jan 20, 2026
@andrei-marinica andrei-marinica deleted the probestack-build-fix branch January 20, 2026 13:34
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