Check for an empty vector before popping (#350)
Protect from possible seg. fault
Signed-off-by: David Galiffi <David.Galiffi@amd.com>
[ROCm/rocprofiler-systems commit: 59e7b4b501]
此提交包含在:
1 父節點
a8595dc524
當前提交
648edf3820
1 file changed
+5
-2
@@ -526,8 +526,11 @@ profiler_function(py::object pframe, const char* swhat, py::object arg)
|
||||
|
||||
// stop function
|
||||
auto _profiler_return = [&]() {
|
||||
_config.records.back()();
|
||||
_config.records.pop_back();
|
||||
if(!_config.records.empty())
|
||||
{
|
||||
_config.records.back()();
|
||||
_config.records.pop_back();
|
||||
}
|
||||
};
|
||||
|
||||
// process what
|
||||
|
||||
Reference in new issue
封鎖使用者