Skip to content

Commit

Permalink
AddressSpace::verify() should not be infallible
Browse files Browse the repository at this point in the history
  • Loading branch information
sidkshatriya committed Nov 7, 2024
1 parent 8b78784 commit 2443444
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/AddressSpace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,11 @@ void AddressSpace::verify(Task* t) const {
LOG(debug) << "Verifying address space for task " << t->tid;

MemoryMap::const_iterator mem_it = mem.begin();
KernelMapIterator kernel_it(t);
bool ok = false;
// Must pass ok parameter otherwise KernelMapIterator constructor will become
// infallible if /proc/[tid]/maps cannot be opened
KernelMapIterator kernel_it(t, &ok);
// checking at_end() is equivalent to checking if ok
if (kernel_it.at_end()) {
LOG(debug) << "Task " << t->tid << " exited unexpectedly, ignoring";
return;
Expand Down

0 comments on commit 2443444

Please sign in to comment.