[PATCH] D44713: Unsubmitted part of D44599
David CARLIER via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 21 12:50:13 PDT 2018
devnexen updated this revision to Diff 139354.
https://reviews.llvm.org/D44713
Files:
lib/sanitizer_common/sanitizer_linux.cc
Index: lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- lib/sanitizer_common/sanitizer_linux.cc
+++ lib/sanitizer_common/sanitizer_linux.cc
@@ -308,8 +308,8 @@
return internal_syscall_ptr(SYSCALL(fstatat), AT_FDCWD, (uptr)path, (uptr)buf,
0);
#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS
- return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path, (uptr)buf,
- 0);
+ return internal_syscall(SYSCALL(newfstatat), AT_FDCWD, (uptr)path,
+ (uptr)buf, 0);
#elif SANITIZER_LINUX_USES_64BIT_SYSCALLS
# if defined(__mips64)
// For mips64, stat syscall fills buffer in the format of kernel_stat
@@ -322,7 +322,7 @@
# endif
#else
struct stat64 buf64;
- int res = internal_syscall(SYSCALL(stat64), path, &buf64);
+ int res = internal_syscall_ptr(SYSCALL(stat64), path, &buf64);
stat64_to_stat(&buf64, (struct stat *)buf);
return res;
#endif
@@ -392,8 +392,8 @@
uptr internal_readlink(const char *path, char *buf, uptr bufsize) {
#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS || SANITIZER_OPENBSD
- return internal_syscall(SYSCALL(readlinkat), AT_FDCWD, (uptr)path, (uptr)buf,
- bufsize);
+ return internal_syscall_ptr(SYSCALL(readlinkat), AT_FDCWD, (uptr)path,
+ (uptr)buf, bufsize);
#else
return internal_syscall_ptr(SYSCALL(readlink), path, buf, bufsize);
#endif
@@ -409,8 +409,8 @@
uptr internal_rename(const char *oldpath, const char *newpath) {
#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS || SANITIZER_OPENBSD
- return internal_syscall(SYSCALL(renameat), AT_FDCWD, (uptr)oldpath, AT_FDCWD,
- (uptr)newpath);
+ return internal_syscall_ptr(SYSCALL(renameat), AT_FDCWD, (uptr)oldpath,
+ AT_FDCWD, (uptr)newpath);
#else
return internal_syscall_ptr(SYSCALL(rename), (uptr)oldpath, (uptr)newpath);
#endif
@@ -1747,7 +1747,11 @@
}
static void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
-#if SANITIZER_NETBSD
+#if SANITIZER_OPENBSD
+ *pc = 0;
+ *bp = 0;
+ *sp = 0;
+#elif SANITIZER_NETBSD
// This covers all NetBSD architectures
ucontext_t *ucontext = (ucontext_t *)context;
*pc = _UC_MACHINE_PC(ucontext);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44713.139354.patch
Type: text/x-patch
Size: 2334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180321/6fa9a22c/attachment.bin>
More information about the llvm-commits
mailing list