[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Vitaly Buka via llvm-branch-commits
@@ -219,6 +219,32 @@ static void StopStackDepotBackgroundThread() { static void StopStackDepotBackgroundThread() {} #endif +void MemCpyAccessible(void *dest, const void *src, uptr n) { + if (TryMemCpy(dest, src, n)) vitalybuka wrote: Not sure as well. On som

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Florian Mayer via llvm-branch-commits
@@ -219,6 +219,32 @@ static void StopStackDepotBackgroundThread() { static void StopStackDepotBackgroundThread() {} #endif +void MemCpyAccessible(void *dest, const void *src, uptr n) { + if (TryMemCpy(dest, src, n)) +return; + + const uptr page_size = GetPageSize(); + u

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Florian Mayer via llvm-branch-commits
@@ -219,6 +219,32 @@ static void StopStackDepotBackgroundThread() { static void StopStackDepotBackgroundThread() {} #endif +void MemCpyAccessible(void *dest, const void *src, uptr n) { + if (TryMemCpy(dest, src, n)) fmayer wrote: I am not fully sure about th

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Florian Mayer via llvm-branch-commits
@@ -273,6 +273,8 @@ bool IsAccessibleMemoryRange(uptr beg, uptr size); // Returns true if we can read a memory range starting at `src`, and copies // content into `dest`. bool TryMemCpy(void *dest, const void *src, uptr n); +// Copies accesible memory, and zero fill the rest. -

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/112794 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/112794 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/112794 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/112794 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/112794 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer Author: Vitaly Buka (vitalybuka) Changes A layer over `TryMemCpy` to copy only availible pages. --- Full diff: https://github.com/llvm/llvm-project/pull/112794.diff 3 Files Affected: - (modified) compiler-rt/lib/sanitizer_commo

[llvm-branch-commits] [sanitizer] Add MemCpyAccessible (PR #112794)

2024-10-17 Thread Vitaly Buka via llvm-branch-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/112794 A layer over `TryMemCpy` to copy only availible pages. ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail