Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

wasmtime implementation violates aliasing requirements #4599

Closed
pepyakin opened this issue Jan 10, 2020 · 2 comments · Fixed by #4686
Closed

wasmtime implementation violates aliasing requirements #4599

pepyakin opened this issue Jan 10, 2020 · 2 comments · Fixed by #4686
Assignees
Labels
I3-bug The node fails to follow expected behavior.
Milestone

Comments

@pepyakin
Copy link
Contributor

When wasmtime handles a call to host functions it uses a mutable pointer to the contents of FunctionExecutorState and linear memory. The problem arises when using the sandbox wasmtime reenters into the host handling routines and obtains the mutable reference to the same items again.

@pepyakin pepyakin added the I3-bug The node fails to follow expected behavior. label Jan 10, 2020
@pepyakin pepyakin added this to the 2.1 milestone Jan 10, 2020
@pepyakin pepyakin self-assigned this Jan 10, 2020
@Demi-Marie
Copy link
Contributor

  1. This is a wasmtime bug, unless we have unsafe somewhere.
  2. Until we have suitable OS-level sandboxing, we should stick with wasmi for the sandbox for security reasons.

@pepyakin
Copy link
Contributor Author

pepyakin commented Jan 28, 2020

  1. Yeah, there is a lot of unsafe used. Not always with a good reason, IMO. That (as well as this issue) should be addressed with executor: Migrate wasmtime backend to a high-level API #4686.
  2. I think this is not relevant: The issue is still present even though we that wasmi is being used for sandbox. It just the implementation of the wasmtime executor backend spawns this issue.

@gnunicorn gnunicorn modified the milestones: 2.1, Polkadot Mar 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I3-bug The node fails to follow expected behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants