Closed inliquid closed 1 year ago
What is your operating system?
As tests utilizing plain stdout
output for validation, this case nevet been passed in case of panic in host stdout.
But others operating systems except Linux never been tested for plugin in periodic manner.
Just tested both on:
And got exact same result.
Just in case, this is how plugin is being initialized:
mc := wazero.NewModuleConfig().WithStdout(os.Stdout).WithStderr(os.Stderr).WithFS(fs)
p, err := api.NewGreeterPlugin(ctx, api.WazeroModuleConfig(mc))
if err != nil {
panic(err)
}
I've reproduced your behavior. It seems plugin code didn't recompiled as both wasm/host have code been changed in last commit https://github.com/knqyf263/go-plugin/commit/9341dcbdcdc65152658b7d84bb96ae7642e9b4f7#diff-0e6c67cd1f316a92a15c89ebaed80e7e68c19cfbc62bf64ffe3262bc058e0e2c
File loading...
panic: free: invalid pointer
Hello WASI!
Sorry I don't quite get, I for sure recompiled protoc
plugin with:
go install github.com/knqyf263/go-plugin/cmd/protoc-gen-go-plugin@main
Note that I took code from main
, not latest
, so it has most recent changes.
Is this what you mean?
Ok, I retried with latest
instead of main
and error disappeared. Is this what I supposed to do?
I switched to using main
because there was some case where I had to.
Yes, sure. Good to know :+1:
Thanks, closing.
I just updated my code snippets to latest
go-plugin
andwazero
, and I start seeing this message in host stdout:It seems it does not affect the logic, just says that something bad (?) happened?
It's with "Cat" example which outputs the contents of a host file by reading it from guest.
I suspect that's because of this change to autogenerated stubs: