Commit 8f7f8214 authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #256 from caringi/fix_crash_on_exit_2

Fix possible crash on exit due to wrong vector size (#201)
parents 75a012c7 32de25fa
......@@ -1157,7 +1157,7 @@ std::vector<uint8_t> BPFtrace::find_empty_key(IMap &map, size_t size) const
if (map.type_.type == Type::count || map.type_.type == Type::hist ||
map.type_.type == Type::sum || map.type_.type == Type::min ||
map.type_.type == Type::max || map.type_.type == Type::avg ||
map.type_.type == Type::stats)
map.type_.type == Type::stats || map.type_.type == Type::lhist)
value_size *= ncpus_;
auto value = std::vector<uint8_t>(value_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment