@@ -6019,8 +6019,8 @@ static void process_execve(RecordTask* t, TaskSyscallState& syscall_state) {
60196019 TraceWriter::EXEC_MAPPING) ==
60206020 TraceWriter::RECORD_IN_TRACE) {
60216021 if (st.st_size > 0 ) {
6022- off64_t end = (off64_t )st.st_size - km.file_offset_bytes ();
6023- t->record_remote (km.start (), min (end, (off64_t )km.size ()));
6022+ off_t end = (off_t )st.st_size - km.file_offset_bytes ();
6023+ t->record_remote (km.start (), min (end, (off_t )km.size ()));
60246024 } else {
60256025 // st_size is not valid. Some device files are mmappable but have zero
60266026 // size. We also take this path if there's no file at all (vdso etc).
@@ -6122,7 +6122,7 @@ static vector<WriteHole> find_holes(RecordTask* t, int desc, uint64_t offset, ui
61226122 uint64_t file_start = offset;
61236123 uint64_t file_end = offset + size;
61246124 while (offset < file_end) {
6125- off64_t r = lseek (fd, offset, SEEK_HOLE);
6125+ off_t r = lseek (fd, offset, SEEK_HOLE);
61266126 if (r < 0 ) {
61276127 // SEEK_HOLE not supported?
61286128 return ret;
@@ -6198,7 +6198,7 @@ static void check_outside_mappings(const KernelMapping& tracee_km, const RecordS
61986198}
61996199
62006200static void process_mmap (RecordTask* t, size_t length, int prot, int flags,
6201- int fd, off64_t offset) {
6201+ int fd, off_t offset) {
62026202 if (t->regs ().syscall_failed ()) {
62036203 // We purely emulate failed mmaps.
62046204 return ;
@@ -6266,8 +6266,8 @@ static void process_mmap(RecordTask* t, size_t length, int prot, int flags,
62666266 TraceWriter::SYSCALL_MAPPING,
62676267 !monitor_this_fd) ==
62686268 TraceWriter::RECORD_IN_TRACE) {
6269- off64_t end = (off64_t )st.st_size - km.file_offset_bytes ();
6270- off64_t nbytes = min (end, (off64_t )km.size ());
6269+ off_t end = (off_t )st.st_size - km.file_offset_bytes ();
6270+ off_t nbytes = min (end, (off_t )km.size ());
62716271 vector<WriteHole> holes = find_holes (t, fd, km.file_offset_bytes (), (uint64_t )nbytes);
62726272 ssize_t nread = t->record_remote_fallible (addr, nbytes, holes);
62736273 if (!adjusted_size && nread != nbytes) {
@@ -6376,10 +6376,10 @@ static void process_mremap(RecordTask* t, remote_ptr<void> old_addr,
63766376 if (t->trace_writer ().write_mapped_region (t, km, st, km.fsname (),
63776377 vector<TraceRemoteFd>()) ==
63786378 TraceWriter::RECORD_IN_TRACE) {
6379- off64_t end = max<off64_t >(st.st_size - km.file_offset_bytes (), 0 );
6379+ off_t end = max<off_t >(st.st_size - km.file_offset_bytes (), 0 );
63806380 // Allow failure; the underlying file may have true zero size, in which
63816381 // case this may try to record unmapped memory.
6382- t->record_remote_fallible (km.start (), min (end, (off64_t )km.size ()));
6382+ t->record_remote_fallible (km.start (), min (end, (off_t )km.size ()));
63836383 }
63846384
63856385 // If the original mapping was monitored, we'll continue monitoring it
0 commit comments