Stream: git-wasmtime

Topic: wasmtime / Issue #958 What to do about cross-`Store` calls?


view this post on Zulip Wasmtime GitHub notifications bot (Mar 10 2020 at 14:28):

alexcrichton closed Issue #958:

In reviewing some code today I started wondering what would happen if you started mixing Store values and instances together. For example you can create two Instance objects in two Store objects, what would happen when they're linked?

The concrete things I know of today we have to worry about are:

I started implementing a fix where we'd simply reject linking instances together if they come from two different Store values, but this is also a problem with any Val::FuncRef getting stored in a table across instances. Especially with reference types this gets really hairy to guard, so I don't think it'll be easy to simply block access at all entry points.

The only fix I can think of is to have a truly global map for all this, but it feels bad to have a truly global ever-expanding map that's never deallocated from. I think we'll want to figure out a way to remove items from the map at least when a Store is dropped (maybe sooner?). In any case wanted to make sure there was an open issue for this!


Last updated: Dec 23 2024 at 12:05 UTC