Addresses of traps #2622
Unanswered
liamappelbe
asked this question in
Q&A
Replies: 2 comments
-
As far as I know, the memory for traps are not moved, but it's not guaranteed. Maybe @syrusakbary can confirm that as he has worked on improving the traps API these past weeks. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Let me rephrase to make it clear. The important part is: “It's not guaranteed”. We could |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using wasmer-c-api version 1.0.2. If I return a trap from a function created using
wasm_func_new_with_env
, and then catch the trap returned bywasm_func_call
, are they guaranteed to have the same address, or can the wasmer runtime move the memory around or make a copy of the trap?I've been using the raw address of the trap as a key in a map where I store extra metadata about the trap, but this doesn't seem to work reliably on windows or mac.
Beta Was this translation helpful? Give feedback.
All reactions