[llvm-branch-commits] [compiler-rt] release/19.x: [sanitizer_common][test] Fix InternalMmapWithOffset on 32-bit Linux/s… (#101011) (PR #101142)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Aug 4 02:22:32 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: None (llvmbot)

<details>
<summary>Changes</summary>

Backport 1c25f2cd470c2882e422b66d0482f5a120960394

Requested by: @<!-- -->rorth

---
Full diff: https://github.com/llvm/llvm-project/pull/101142.diff


1 Files Affected:

- (modified) compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp (+1-1) 


``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index 76acf591871ab..1d6a55bdb7f38 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -220,7 +220,7 @@ uptr internal_mmap(void *addr, uptr length, int prot, int flags, int fd,
   // mmap2 specifies file offset in 4096-byte units.
   CHECK(IsAligned(offset, 4096));
   return internal_syscall(SYSCALL(mmap2), addr, length, prot, flags, fd,
-                          offset / 4096);
+                          (OFF_T)(offset / 4096));
 #      endif
 }
 #    endif  // !SANITIZER_S390

``````````

</details>


https://github.com/llvm/llvm-project/pull/101142


More information about the llvm-branch-commits mailing list