We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8b1db0 commit efa5fe8Copy full SHA for efa5fe8
1 file changed
src/Task.cc
@@ -2640,6 +2640,11 @@ bool Task::open_mem_fd() {
2640
AutoRestoreMem remote_path(remote, mem, sizeof(mem));
2641
int remote_mem_fd = remote.syscall(syscall_number_for_openat(arch()),
2642
remote_mem_dir_fd, remote_path.get(), O_RDWR);
2643
+ if (remote_mem_fd < 0) {
2644
+ LOG(info) << "Can't retrieve mem fd for " << tid
2645
+ << "; couldn't open /proc/...mem; errno=" << errno_name(-remote_mem_fd);
2646
+ return false;
2647
+ }
2648
fd = remote.retrieve_fd(remote_mem_fd);
2649
remote.infallible_close_syscall_if_alive(remote_mem_fd);
2650
remote.infallible_close_syscall_if_alive(remote_mem_dir_fd);
0 commit comments