flavio opened issue #12905:
After upgrading from wasmtime 42.0 to 43.0, some of my unit tests started failing.
My code was:
- Defining a Linker
- Defining some host functions on the linker
- Cloning the linker
- Storing the cloned linker for future reuse
- Dropping the original linker
The cloned linker was not capable of producing an Instance, because it wasn't capable of resolving the imported functions.
Test Case
No special Wasm file needed to reproduce the issue
Steps to Reproduce
I've created a reproducer here.
Checkout the code and run:
make run-v42The code will work as expected.
Then run:
make run-v43The linker bug will cause the program to error.
Expected Results
Cloning a
Linker, and reusing it at a future point in time should not lead to runtime errors.Actual Results
The creation of an
Instancefails with an error. The error complains about the linker
not being able to resolve the used importes.Versions and Environment
Wasmtime version or commit: >= 43.0.0
Operating system: Linux
Architecture: x86_64
Extra Info
I've used AI during the debugging process. I've a good knowledge of wasmtime internal, ofc not like any of the maintainers :sweat_smile: . I think the root cause is correct, there's no AI allucination.
I've also produced a fix for that (PR to come).
flavio added the bug label to Issue #12905.
flavio edited issue #12905:
After upgrading from wasmtime 42.0 to 43.0, some of my unit tests started failing.
My code was:
- Defining a Linker
- Defining some host functions on the linker
- Cloning the linker
- Storing the cloned linker for future reuse
- Dropping the original linker
The cloned linker was not capable of producing an Instance, because it wasn't capable of resolving the imported functions.
Test Case
No special Wasm file needed to reproduce the issue
Steps to Reproduce
I've created a reproducer here.
Checkout the code and run:
make run-v42The code will work as expected.
Then run:
make run-v43The linker bug will cause the program to error.
Expected Results
Cloning a
Linker, and reusing it at a future point in time should not lead to runtime errors.Actual Results
The creation of an
Instancefails with an error. The error complains about the linker
not being able to resolve the used importes.Versions and Environment
Wasmtime version or commit: >= 43.0.0
Operating system: Linux
Architecture: x86_64
Extra Info
I've used AI during the debugging process. I've a good knowledge of wasmtime internal, ofc not like any of the maintainers :sweat_smile: . I think the root cause is correct, there's no AI allucination.
I've also produced a fix for that (PR to come).
Update: PR
alexcrichton closed issue #12905:
After upgrading from wasmtime 42.0 to 43.0, some of my unit tests started failing.
My code was:
- Defining a Linker
- Defining some host functions on the linker
- Cloning the linker
- Storing the cloned linker for future reuse
- Dropping the original linker
The cloned linker was not capable of producing an Instance, because it wasn't capable of resolving the imported functions.
Test Case
No special Wasm file needed to reproduce the issue
Steps to Reproduce
I've created a reproducer here.
Checkout the code and run:
make run-v42The code will work as expected.
Then run:
make run-v43The linker bug will cause the program to error.
Expected Results
Cloning a
Linker, and reusing it at a future point in time should not lead to runtime errors.Actual Results
The creation of an
Instancefails with an error. The error complains about the linker
not being able to resolve the used importes.Versions and Environment
Wasmtime version or commit: >= 43.0.0
Operating system: Linux
Architecture: x86_64
Extra Info
I've used AI during the debugging process. I've a good knowledge of wasmtime internal, ofc not like any of the maintainers :sweat_smile: . I think the root cause is correct, there's no AI allucination.
I've also produced a fix for that (PR to come).
Update: PR
alexcrichton commented on issue #12905:
Fixed in https://github.com/bytecodealliance/wasmtime/pull/12906
Last updated: Apr 13 2026 at 00:25 UTC