From 137ee81698b423382fb285acacec912022fed1f0 Mon Sep 17 00:00:00 2001 From: Teng Qin Date: Fri, 25 Aug 2017 16:29:16 -0700 Subject: [PATCH] Fix uninitialized ProcMountNS in USDT Context --- src/cc/usdt/usdt.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cc/usdt/usdt.cc b/src/cc/usdt/usdt.cc index ccb7caab..ce92acc6 100644 --- a/src/cc/usdt/usdt.cc +++ b/src/cc/usdt/usdt.cc @@ -285,7 +285,8 @@ void Context::each_uprobe(each_uprobe_cb callback) { } } -Context::Context(const std::string &bin_path) : loaded_(false) { +Context::Context(const std::string &bin_path) + : mount_ns_instance_(new ProcMountNS(-1)), loaded_(false) { std::string full_path = resolve_bin_path(bin_path); if (!full_path.empty()) { if (bcc_elf_foreach_usdt(full_path.c_str(), _each_probe, this) == 0) { -- 2.34.1