[PATCH] D81689: [WebAssembly] New-style command support

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 01:07:17 PDT 2022


sbc100 added a comment.

IIUC, with commands you can call back into the module, but only while the command entry point (`_start`) is running.  i.e. while `_start` is running it can call out, and you can callback in as much as you want.

Once `_start` returns the instance is no longer in a valid state and can no longer called into (for example it would not be valid to call `malloc` after `_start` returns since the heap data structures may have been torn down).

If you want to call into a module after `_start` returns (and have the state preserved between calls) then what you want is a reactor and you should use `_initialize` rather than `_start`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81689/new/

https://reviews.llvm.org/D81689



More information about the llvm-commits mailing list