Segfault when (thread) CounterStats is called with empty vector
ahueck opened this issue · 0 comments
ahueck commented
The segfault happens, if the Runtime is instantiated (and then discarded) by calling only the API that does not mutate the AccessCounter during execution, e.g.,
int main(int argc, char** argv) {
const void* ret_check=NULL;
const void* addr = 1;
typeart_get_return_address(addr, &ret_check);
return 0;
}
Defect
CounterStats::create -> vals
is empty, the following code causes the segfault:
Counter min = *std::min_element(vals.begin(), vals.end());
Counter max = *std::max_element(vals.begin(), vals.end());