Skip to content

Commit fe78d8a

Browse files
mathetakechrisxrepo
authored andcommitted
wasm: pass PluginHandle to stream contexts. (envoyproxy#16795)
Previously, stream contexts (i.e. filter instances) are not holding shared ptrs to Wasm plugins which take ownership of Wasm VMs, and only holding raw pointers to Wasm VMs. If Wasm plugins (i.e. factory) die earlier than stream contexts during ECDS updates, then the left stream contexts will try using invalidated pointers to Wasm VM and this results in crashes. So this commit passes the PluginHandle to all the stream contexts which the plugin generates, so the VM must outlive all stream contexts by which it is used. Counter part in Proxy-Wasm C++ Host: proxy-wasm/proxy-wasm-cpp-host#167 Resolves istio/istio#33091 Signed-off-by: Takeshi Yoneda <[email protected]> Signed-off-by: chris.xin <[email protected]>
1 parent 586b71d commit fe78d8a

File tree

21 files changed

+143
-90
lines changed

21 files changed

+143
-90
lines changed

bazel/repository_locations.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,8 +975,8 @@ REPOSITORY_LOCATIONS_SPEC = dict(
975975
project_name = "WebAssembly for Proxies (C++ host implementation)",
976976
project_desc = "WebAssembly for Proxies (C++ host implementation)",
977977
project_url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host",
978-
version = "605ee8a0eb78127e81f53bcc3f0b7ec983fb65c2",
979-
sha256 = "7996d1d34ca0cae4079dc2dbe9b8d51ec6db5cb78ab93533bb8cd31ef970b84a",
978+
version = "b524f41680cbc5563c7f4f9113ec70d54078b4f6",
979+
sha256 = "dfd9b41cf5c1f310f3db1342f93ea1beb700b5461412dd87a6a2ca2064005372",
980980
strip_prefix = "proxy-wasm-cpp-host-{version}",
981981
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/{version}.tar.gz"],
982982
use_category = ["dataplane_ext"],
@@ -992,7 +992,7 @@ REPOSITORY_LOCATIONS_SPEC = dict(
992992
"envoy.wasm.runtime.wavm",
993993
"envoy.wasm.runtime.wasmtime",
994994
],
995-
release_date = "2021-06-09",
995+
release_date = "2021-06-24",
996996
cpe = "N/A",
997997
),
998998
proxy_wasm_rust_sdk = dict(

source/extensions/access_loggers/wasm/config.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ namespace Extensions {
1414
namespace AccessLoggers {
1515
namespace Wasm {
1616

17+
using Common::Wasm::PluginHandleSharedPtrThreadLocal;
18+
1719
AccessLog::InstanceSharedPtr WasmAccessLogFactory::createAccessLogInstance(
1820
const Protobuf::Message& proto_config, AccessLog::FilterPtr&& filter,
1921
Server::Configuration::CommonFactoryContext& context) {
@@ -30,9 +32,10 @@ AccessLog::InstanceSharedPtr WasmAccessLogFactory::createAccessLogInstance(
3032
auto callback = [access_log, &context, plugin](Common::Wasm::WasmHandleSharedPtr base_wasm) {
3133
// NB: the Slot set() call doesn't complete inline, so all arguments must outlive this call.
3234
auto tls_slot =
33-
ThreadLocal::TypedSlot<Common::Wasm::PluginHandle>::makeUnique(context.threadLocal());
35+
ThreadLocal::TypedSlot<PluginHandleSharedPtrThreadLocal>::makeUnique(context.threadLocal());
3436
tls_slot->set([base_wasm, plugin](Event::Dispatcher& dispatcher) {
35-
return Common::Wasm::getOrCreateThreadLocalPlugin(base_wasm, plugin, dispatcher);
37+
return std::make_shared<PluginHandleSharedPtrThreadLocal>(
38+
Common::Wasm::getOrCreateThreadLocalPlugin(base_wasm, plugin, dispatcher));
3639
});
3740
access_log->setTlsSlot(std::move(tls_slot));
3841
};

source/extensions/access_loggers/wasm/wasm_access_log_impl.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ namespace Extensions {
1010
namespace AccessLoggers {
1111
namespace Wasm {
1212

13-
using Envoy::Extensions::Common::Wasm::PluginHandle;
13+
using Common::Wasm::PluginHandleSharedPtrThreadLocal;
1414
using Envoy::Extensions::Common::Wasm::PluginSharedPtr;
1515

1616
class WasmAccessLog : public AccessLog::Instance {
1717
public:
18-
WasmAccessLog(const PluginSharedPtr& plugin, ThreadLocal::TypedSlotPtr<PluginHandle>&& tls_slot,
18+
WasmAccessLog(const PluginSharedPtr& plugin,
19+
ThreadLocal::TypedSlotPtr<PluginHandleSharedPtrThreadLocal>&& tls_slot,
1920
AccessLog::FilterPtr filter)
2021
: plugin_(plugin), tls_slot_(std::move(tls_slot)), filter_(std::move(filter)) {}
2122

@@ -30,21 +31,21 @@ class WasmAccessLog : public AccessLog::Instance {
3031
}
3132
}
3233

33-
auto handle = tls_slot_->get();
34-
if (handle.has_value()) {
35-
handle->wasm()->log(plugin_, request_headers, response_headers, response_trailers,
36-
stream_info);
34+
auto handle = tls_slot_->get()->handle();
35+
if (handle->wasmHandle()) {
36+
handle->wasmHandle()->wasm()->log(plugin_, request_headers, response_headers,
37+
response_trailers, stream_info);
3738
}
3839
}
3940

40-
void setTlsSlot(ThreadLocal::TypedSlotPtr<PluginHandle>&& tls_slot) {
41+
void setTlsSlot(ThreadLocal::TypedSlotPtr<PluginHandleSharedPtrThreadLocal>&& tls_slot) {
4142
ASSERT(tls_slot_ == nullptr);
4243
tls_slot_ = std::move(tls_slot);
4344
}
4445

4546
private:
4647
PluginSharedPtr plugin_;
47-
ThreadLocal::TypedSlotPtr<PluginHandle> tls_slot_;
48+
ThreadLocal::TypedSlotPtr<PluginHandleSharedPtrThreadLocal> tls_slot_;
4849
AccessLog::FilterPtr filter_;
4950
};
5051

source/extensions/bootstrap/wasm/config.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ void WasmServiceExtension::createWasm(Server::Configuration::ServerFactoryContex
3939
// Per-thread WASM VM.
4040
// NB: the Slot set() call doesn't complete inline, so all arguments must outlive this call.
4141
auto tls_slot =
42-
ThreadLocal::TypedSlot<Common::Wasm::PluginHandle>::makeUnique(context.threadLocal());
42+
ThreadLocal::TypedSlot<Common::Wasm::PluginHandleSharedPtrThreadLocal>::makeUnique(
43+
context.threadLocal());
4344
tls_slot->set([base_wasm, plugin](Event::Dispatcher& dispatcher) {
44-
return Common::Wasm::getOrCreateThreadLocalPlugin(base_wasm, plugin, dispatcher);
45+
return std::make_shared<Common::Wasm::PluginHandleSharedPtrThreadLocal>(
46+
Common::Wasm::getOrCreateThreadLocalPlugin(base_wasm, plugin, dispatcher));
4547
});
4648
wasm_service_ = std::make_unique<WasmService>(plugin, std::move(tls_slot));
4749
};

source/extensions/bootstrap/wasm/config.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,22 @@ namespace Extensions {
1515
namespace Bootstrap {
1616
namespace Wasm {
1717

18-
using Envoy::Extensions::Common::Wasm::PluginHandle;
18+
using Common::Wasm::PluginHandleSharedPtrThreadLocal;
1919
using Envoy::Extensions::Common::Wasm::PluginHandleSharedPtr;
2020
using Envoy::Extensions::Common::Wasm::PluginSharedPtr;
2121

2222
class WasmService {
2323
public:
2424
WasmService(PluginSharedPtr plugin, PluginHandleSharedPtr singleton)
2525
: plugin_(plugin), singleton_(std::move(singleton)) {}
26-
WasmService(PluginSharedPtr plugin, ThreadLocal::TypedSlotPtr<PluginHandle>&& tls_slot)
26+
WasmService(PluginSharedPtr plugin,
27+
ThreadLocal::TypedSlotPtr<PluginHandleSharedPtrThreadLocal>&& tls_slot)
2728
: plugin_(plugin), tls_slot_(std::move(tls_slot)) {}
2829

2930
private:
3031
PluginSharedPtr plugin_;
3132
PluginHandleSharedPtr singleton_;
32-
ThreadLocal::TypedSlotPtr<PluginHandle> tls_slot_;
33+
ThreadLocal::TypedSlotPtr<PluginHandleSharedPtrThreadLocal> tls_slot_;
3334
};
3435

3536
using WasmServicePtr = std::unique_ptr<WasmService>;

source/extensions/common/wasm/context.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "source/extensions/common/wasm/context.h"
2+
13
#include <algorithm>
24
#include <cctype>
35
#include <cstring>
@@ -148,8 +150,8 @@ Context::Context(Wasm* wasm) : ContextBase(wasm) {}
148150
Context::Context(Wasm* wasm, const PluginSharedPtr& plugin) : ContextBase(wasm, plugin) {
149151
root_local_info_ = &std::static_pointer_cast<Plugin>(plugin)->localInfo();
150152
}
151-
Context::Context(Wasm* wasm, uint32_t root_context_id, const PluginSharedPtr& plugin)
152-
: ContextBase(wasm, root_context_id, plugin) {}
153+
Context::Context(Wasm* wasm, uint32_t root_context_id, PluginHandleSharedPtr plugin_handle)
154+
: ContextBase(wasm, root_context_id, plugin_handle), plugin_handle_(plugin_handle) {}
153155

154156
Wasm* Context::wasm() const { return static_cast<Wasm*>(wasm_); }
155157
Plugin* Context::plugin() const { return static_cast<Plugin*>(plugin_.get()); }

source/extensions/common/wasm/context.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ using CapabilityRestrictionConfig = envoy::extensions::wasm::v3::CapabilityRestr
4646
using SanitizationConfig = envoy::extensions::wasm::v3::SanitizationConfig;
4747
using GrpcService = envoy::config::core::v3::GrpcService;
4848

49+
class PluginHandle;
4950
class Wasm;
5051

5152
using PluginBaseSharedPtr = std::shared_ptr<PluginBase>;
5253
using PluginHandleBaseSharedPtr = std::shared_ptr<PluginHandleBase>;
54+
using PluginHandleSharedPtr = std::shared_ptr<PluginHandle>;
5355
using WasmHandleBaseSharedPtr = std::shared_ptr<WasmHandleBase>;
5456

5557
// Opaque context object.
@@ -110,10 +112,11 @@ class Context : public proxy_wasm::ContextBase,
110112
public google::api::expr::runtime::BaseActivation,
111113
public std::enable_shared_from_this<Context> {
112114
public:
113-
Context(); // Testing.
114-
Context(Wasm* wasm); // Vm Context.
115-
Context(Wasm* wasm, const PluginSharedPtr& plugin); // Root Context.
116-
Context(Wasm* wasm, uint32_t root_context_id, const PluginSharedPtr& plugin); // Stream context.
115+
Context(); // Testing.
116+
Context(Wasm* wasm); // Vm Context.
117+
Context(Wasm* wasm, const PluginSharedPtr& plugin); // Root Context.
118+
Context(Wasm* wasm, uint32_t root_context_id,
119+
PluginHandleSharedPtr plugin_handle); // Stream context.
117120
~Context() override;
118121

119122
Wasm* wasm() const;
@@ -396,6 +399,7 @@ class Context : public proxy_wasm::ContextBase,
396399
const Http::HeaderMap* getConstMap(WasmHeaderMapType type);
397400

398401
const LocalInfo::LocalInfo* root_local_info_{nullptr}; // set only for root_context.
402+
PluginHandleSharedPtr plugin_handle_{nullptr};
399403

400404
uint32_t next_http_call_token_ = 1;
401405
uint32_t next_grpc_token_ = 1; // Odd tokens are for Calls even for Streams.

source/extensions/common/wasm/wasm.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,9 @@ getOrCreateThreadLocalPlugin(const WasmHandleSharedPtr& base_wasm, const PluginS
474474
ENVOY_LOG_TO_LOGGER(Envoy::Logger::Registry::getLog(Envoy::Logger::Id::wasm), critical,
475475
"Plugin configured to fail closed failed to load");
476476
}
477-
return nullptr;
477+
// To handle the case when failed to create VMs and fail-open/close properly,
478+
// we still create PluginHandle with null WasmBase.
479+
return std::make_shared<PluginHandle>(nullptr, plugin);
478480
}
479481
return std::static_pointer_cast<PluginHandle>(proxy_wasm::getOrCreateThreadLocalPlugin(
480482
std::static_pointer_cast<WasmHandle>(base_wasm), plugin,

source/extensions/common/wasm/wasm.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,25 +137,32 @@ class WasmHandle : public WasmHandleBase, public ThreadLocal::ThreadLocalObject
137137

138138
using WasmHandleSharedPtr = std::shared_ptr<WasmHandle>;
139139

140-
class PluginHandle : public PluginHandleBase, public ThreadLocal::ThreadLocalObject {
140+
class PluginHandle : public PluginHandleBase {
141141
public:
142142
explicit PluginHandle(const WasmHandleSharedPtr& wasm_handle, const PluginSharedPtr& plugin)
143143
: PluginHandleBase(std::static_pointer_cast<WasmHandleBase>(wasm_handle),
144144
std::static_pointer_cast<PluginBase>(plugin)),
145-
wasm_handle_(wasm_handle),
146-
root_context_id_(wasm_handle->wasm()->getRootContext(plugin, false)->id()) {}
145+
plugin_(plugin), wasm_handle_(wasm_handle) {}
147146

148-
WasmSharedPtr& wasm() { return wasm_handle_->wasm(); }
149-
WasmHandleSharedPtr& wasmHandleForTest() { return wasm_handle_; }
150-
uint32_t rootContextId() { return root_context_id_; }
147+
WasmHandleSharedPtr& wasmHandle() { return wasm_handle_; }
148+
uint32_t rootContextId() { return wasm_handle_->wasm()->getRootContext(plugin_, false)->id(); }
151149

152150
private:
151+
PluginSharedPtr plugin_;
153152
WasmHandleSharedPtr wasm_handle_;
154-
const uint32_t root_context_id_;
155153
};
156154

157155
using PluginHandleSharedPtr = std::shared_ptr<PluginHandle>;
158156

157+
class PluginHandleSharedPtrThreadLocal : public ThreadLocal::ThreadLocalObject {
158+
public:
159+
PluginHandleSharedPtrThreadLocal(PluginHandleSharedPtr handle) : handle_(handle){};
160+
PluginHandleSharedPtr& handle() { return handle_; }
161+
162+
private:
163+
PluginHandleSharedPtr handle_;
164+
};
165+
159166
using CreateWasmCallback = std::function<void(WasmHandleSharedPtr)>;
160167

161168
// Returns false if createWasm failed synchronously. This is necessary because xDS *MUST* report

source/extensions/filters/http/wasm/wasm_filter.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ namespace Wasm {
77

88
FilterConfig::FilterConfig(const envoy::extensions::filters::http::wasm::v3::Wasm& config,
99
Server::Configuration::FactoryContext& context)
10-
: tls_slot_(
11-
ThreadLocal::TypedSlot<Common::Wasm::PluginHandle>::makeUnique(context.threadLocal())) {
10+
: tls_slot_(ThreadLocal::TypedSlot<Common::Wasm::PluginHandleSharedPtrThreadLocal>::makeUnique(
11+
context.threadLocal())) {
1212
plugin_ = std::make_shared<Common::Wasm::Plugin>(
1313
config.config(), context.direction(), context.localInfo(), &context.listenerMetadata());
1414

1515
auto plugin = plugin_;
1616
auto callback = [plugin, this](const Common::Wasm::WasmHandleSharedPtr& base_wasm) {
1717
// NB: the Slot set() call doesn't complete inline, so all arguments must outlive this call.
1818
tls_slot_->set([base_wasm, plugin](Event::Dispatcher& dispatcher) {
19-
return Common::Wasm::getOrCreateThreadLocalPlugin(base_wasm, plugin, dispatcher);
19+
return std::make_shared<PluginHandleSharedPtrThreadLocal>(
20+
Common::Wasm::getOrCreateThreadLocalPlugin(base_wasm, plugin, dispatcher));
2021
});
2122
};
2223

source/extensions/filters/http/wasm/wasm_filter.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace HttpFilters {
1616
namespace Wasm {
1717

1818
using Envoy::Extensions::Common::Wasm::Context;
19-
using Envoy::Extensions::Common::Wasm::PluginHandle;
19+
using Envoy::Extensions::Common::Wasm::PluginHandleSharedPtr;
20+
using Envoy::Extensions::Common::Wasm::PluginHandleSharedPtrThreadLocal;
2021
using Envoy::Extensions::Common::Wasm::PluginSharedPtr;
2122
using Envoy::Extensions::Common::Wasm::Wasm;
2223

@@ -27,25 +28,25 @@ class FilterConfig : Logger::Loggable<Logger::Id::wasm> {
2728

2829
std::shared_ptr<Context> createFilter() {
2930
Wasm* wasm = nullptr;
30-
auto handle = tls_slot_->get();
31-
if (handle.has_value()) {
32-
wasm = handle->wasm().get();
31+
PluginHandleSharedPtr handle = tls_slot_->get()->handle();
32+
if (handle->wasmHandle()) {
33+
wasm = handle->wasmHandle()->wasm().get();
3334
}
3435
if (!wasm || wasm->isFailed()) {
3536
if (plugin_->fail_open_) {
3637
// Fail open skips adding this filter to callbacks.
3738
return nullptr;
3839
} else {
3940
// Fail closed is handled by an empty Context.
40-
return std::make_shared<Context>(nullptr, 0, plugin_);
41+
return std::make_shared<Context>(nullptr, 0, handle);
4142
}
4243
}
43-
return std::make_shared<Context>(wasm, handle->rootContextId(), plugin_);
44+
return std::make_shared<Context>(wasm, handle->rootContextId(), handle);
4445
}
4546

4647
private:
4748
PluginSharedPtr plugin_;
48-
ThreadLocal::TypedSlotPtr<PluginHandle> tls_slot_;
49+
ThreadLocal::TypedSlotPtr<PluginHandleSharedPtrThreadLocal> tls_slot_;
4950
Config::DataSource::RemoteAsyncDataProviderPtr remote_data_provider_;
5051
};
5152

source/extensions/filters/network/wasm/wasm_filter.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ namespace Wasm {
77

88
FilterConfig::FilterConfig(const envoy::extensions::filters::network::wasm::v3::Wasm& config,
99
Server::Configuration::FactoryContext& context)
10-
: tls_slot_(
11-
ThreadLocal::TypedSlot<Common::Wasm::PluginHandle>::makeUnique(context.threadLocal())) {
10+
: tls_slot_(ThreadLocal::TypedSlot<Common::Wasm::PluginHandleSharedPtrThreadLocal>::makeUnique(
11+
context.threadLocal())) {
1212
plugin_ = std::make_shared<Common::Wasm::Plugin>(
1313
config.config(), context.direction(), context.localInfo(), &context.listenerMetadata());
1414

1515
auto plugin = plugin_;
1616
auto callback = [plugin, this](Common::Wasm::WasmHandleSharedPtr base_wasm) {
1717
// NB: the Slot set() call doesn't complete inline, so all arguments must outlive this call.
1818
tls_slot_->set([base_wasm, plugin](Event::Dispatcher& dispatcher) {
19-
return Common::Wasm::getOrCreateThreadLocalPlugin(base_wasm, plugin, dispatcher);
19+
return std::make_shared<PluginHandleSharedPtrThreadLocal>(
20+
Common::Wasm::getOrCreateThreadLocalPlugin(base_wasm, plugin, dispatcher));
2021
});
2122
};
2223

source/extensions/filters/network/wasm/wasm_filter.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ namespace NetworkFilters {
1616
namespace Wasm {
1717

1818
using Envoy::Extensions::Common::Wasm::Context;
19-
using Envoy::Extensions::Common::Wasm::PluginHandle;
19+
using Envoy::Extensions::Common::Wasm::PluginHandleSharedPtr;
20+
using Envoy::Extensions::Common::Wasm::PluginHandleSharedPtrThreadLocal;
2021
using Envoy::Extensions::Common::Wasm::PluginSharedPtr;
2122
using Envoy::Extensions::Common::Wasm::Wasm;
2223

@@ -27,27 +28,27 @@ class FilterConfig : Logger::Loggable<Logger::Id::wasm> {
2728

2829
std::shared_ptr<Context> createFilter() {
2930
Wasm* wasm = nullptr;
30-
auto handle = tls_slot_->get();
31-
if (handle.has_value()) {
32-
wasm = handle->wasm().get();
31+
PluginHandleSharedPtr handle = tls_slot_->get()->handle();
32+
if (handle->wasmHandle()) {
33+
wasm = handle->wasmHandle()->wasm().get();
3334
}
3435
if (!wasm || wasm->isFailed()) {
3536
if (plugin_->fail_open_) {
3637
// Fail open skips adding this filter to callbacks.
3738
return nullptr;
3839
} else {
3940
// Fail closed is handled by an empty Context.
40-
return std::make_shared<Context>(nullptr, 0, plugin_);
41+
return std::make_shared<Context>(nullptr, 0, handle);
4142
}
4243
}
43-
return std::make_shared<Context>(wasm, handle->rootContextId(), plugin_);
44+
return std::make_shared<Context>(wasm, handle->rootContextId(), handle);
4445
}
4546

46-
Wasm* wasmForTest() { return tls_slot_->get()->wasm().get(); }
47+
Wasm* wasmForTest() { return tls_slot_->get()->handle()->wasmHandle()->wasm().get(); }
4748

4849
private:
4950
PluginSharedPtr plugin_;
50-
ThreadLocal::TypedSlotPtr<PluginHandle> tls_slot_;
51+
ThreadLocal::TypedSlotPtr<PluginHandleSharedPtrThreadLocal> tls_slot_;
5152
Config::DataSource::RemoteAsyncDataProviderPtr remote_data_provider_;
5253
};
5354

source/extensions/stat_sinks/wasm/wasm_stat_sink_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class WasmStatSink : public Stats::Sink {
2121
: plugin_(plugin), singleton_(singleton) {}
2222

2323
void flush(Stats::MetricSnapshot& snapshot) override {
24-
singleton_->wasm()->onStatsUpdate(plugin_, snapshot);
24+
singleton_->wasmHandle()->wasm()->onStatsUpdate(plugin_, snapshot);
2525
}
2626

2727
void setSingleton(PluginHandleSharedPtr singleton) {

test/extensions/common/wasm/wasm_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,8 @@ class WasmCommonContextTest
14181418
}
14191419

14201420
void setupContext() {
1421-
context_ = std::make_unique<TestContext>(wasm_->wasm().get(), root_context_->id(), plugin_);
1421+
context_ =
1422+
std::make_unique<TestContext>(wasm_->wasm().get(), root_context_->id(), plugin_handle_);
14221423
context_->onCreate();
14231424
}
14241425

0 commit comments

Comments
 (0)