Skip to content

Commit 9571c26

Browse files
committed
rebase
Created using spr 1.3.4
1 parent 07311b2 commit 9571c26

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ bool IsAccessibleMemoryRange(uptr beg, uptr size) {
327327
}
328328

329329
bool TryMemCpy(void *dest, const void *src, uptr n) {
330+
if (!n)
331+
return true;
330332
int fds[2];
331333
CHECK_EQ(0, pipe(fds));
332334

compiler-rt/lib/sanitizer_common/tests/sanitizer_posix_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# include <pthread.h>
1717
# include <sys/mman.h>
1818

19+
# include <algorithm>
1920
# include <numeric>
2021

2122
# include "gtest/gtest.h"

0 commit comments

Comments
 (0)