Skip to content

Commit

Permalink
i#6662 func_id_filter: large function IDs
Browse files Browse the repository at this point in the history
When filtering function related markers by function ID we need to
provide the original marker value (i.e., function ID) in the trace.
When filtering out system calls, the ID can be large due to
TRACE_FUNC_ID_SYSCALL_BASE (which is 0x100000000ULL == 4294967296 for x64)
that is added to the system call number, and can cause an std::out_of_range
error.
We now use std::stoll to handle large function IDs.

Issue #6662
  • Loading branch information
edeiana committed Jul 9, 2024
1 parent 8a766f4 commit c659472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/drcachesim/tools/filter/record_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ parse_string(const std::string &s, char sep = ',')
std::vector<T> vec;
do {
pos = s.find(sep, at);
vec.push_back(static_cast<T>(std::stoi(s.substr(at, pos))));
vec.push_back(static_cast<T>(std::stoll(s.substr(at, pos))));
at = pos + 1;
} while (pos != std::string::npos);
return vec;
Expand Down

0 comments on commit c659472

Please sign in to comment.