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

mod1.wasm references wrong address for global static value in host wasm #1

Open
Momijiichigo opened this issue Nov 18, 2024 · 0 comments

Comments

@Momijiichigo
Copy link
Owner

Momijiichigo commented Nov 18, 2024

# Calling `investigate_problem()` within host.wasm
- Before exec....
public static in host: 0x1007b4
- After exec

# Calling `investigate_problem()` in mod1.wasm from host.wasm
- Before exec....
public static in host: 0x0
- After exec

section in investigate_problem:
Host Wasm⇐ ⇛ mod1.wasm
image

1050548 = 0x1007b4

As it can be seen in the diff (line 152 on the left, 145 on the right), the address is hard coded in the wasm. (Not a runtime problem with __stack_pointer, etc.)

The solution should be on the compiler & wasm modification side

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

No branches or pull requests

1 participant