alexcrichton added the wasmtime:c-api label to Issue #8367.
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:
- Create a
wasmtime_externref_t
- Put that in
wasmtime_val_t
- Pass that to
wasmtime_func_call
- Run
store.gc()
- Assert that the value has geen gc'd
The problem appears to be here if I'm understanding this correctly. Notably in this location there's no
RootScope
so theto_val
, which creates aRooted<T>
, attaches itself to theStore
directly meaning that it's now un-collect-able.cc @fitzgen
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:
- peterhuene: wasmtime:c-api
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
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
?
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:
- Create a
wasmtime_externref_t
- Put that in
wasmtime_val_t
- Pass that to
wasmtime_func_call
- Run
store.gc()
- Assert that the value has geen gc'd
The problem appears to be here if I'm understanding this correctly. Notably in this location there's no
RootScope
so theto_val
, which creates aRooted<T>
, attaches itself to theStore
directly meaning that it's now un-collect-able.cc @fitzgen
Last updated: Nov 22 2024 at 17:03 UTC