Stream: git-wasmtime

Topic: wasmtime / issue #8367 C API prevents GC'ing externref va...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2024 at 19:42):

alexcrichton added the wasmtime:c-api label to Issue #8367.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2024 at 19:42):

alexcrichton opened issue #8367:

I'm in the process of trying to update wasmtime-py to the latest C API to weed out any issues ahead of the 20.0.0 release. One test is currently failing which asserts that a value is collected and unreferenced in Python, but it's failing. The general shape is:

The problem appears to be here if I'm understanding this correctly. Notably in this location there's no RootScope so the to_val, which creates a Rooted<T>, attaches itself to the Store directly meaning that it's now un-collect-able.

cc @fitzgen

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2024 at 19:43):

github-actions[bot] commented on issue #8367:

Subscribe to Label Action

cc @peterhuene

<details>
This issue or pull request has been labeled: "wasmtime:c-api"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2024 at 21:10):

fitzgen commented on issue #8367:

Yeah that function takes any impl AsContextMut and it is on callers to provide a suitable context, since that function cannot (it returns a rooted value, so that function can't create the scope, callers must).

So the question is: which caller needs to be updated to add a root scope? I guess wasmtime_func_call?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 15 2024 at 22:43):

alexcrichton closed issue #8367:

I'm in the process of trying to update wasmtime-py to the latest C API to weed out any issues ahead of the 20.0.0 release. One test is currently failing which asserts that a value is collected and unreferenced in Python, but it's failing. The general shape is:

The problem appears to be here if I'm understanding this correctly. Notably in this location there's no RootScope so the to_val, which creates a Rooted<T>, attaches itself to the Store directly meaning that it's now un-collect-able.

cc @fitzgen


Last updated: Dec 23 2024 at 12:05 UTC