[compiler-rt] 7f7cab6 - [sanitizer][aarch64] fix clone system call's inline assembly
hyeongyu kim via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 13 16:53:35 PST 2021
Author: hyeongyu kim
Date: 2021-11-14T09:45:40+09:00
New Revision: 7f7cab6bb1d48b53e1fa9ab5a4fd7bcf7f00f19b
URL: https://github.com/llvm/llvm-project/commit/7f7cab6bb1d48b53e1fa9ab5a4fd7bcf7f00f19b
DIFF: https://github.com/llvm/llvm-project/commit/7f7cab6bb1d48b53e1fa9ab5a4fd7bcf7f00f19b.diff
LOG: [sanitizer][aarch64] fix clone system call's inline assembly
Return value of the system call was not returned normally.
It was discussed at https://reviews.llvm.org/D105169.
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index aa59d9718ca89..596037d772222 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -1380,7 +1380,7 @@ uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg,
#elif defined(__aarch64__)
uptr internal_clone(int (*fn)(void *), void *child_stack, int flags, void *arg,
int *parent_tidptr, void *newtls, int *child_tidptr) {
- long long res;
+ register long long res __asm__("x0");
if (!fn || !child_stack)
return -EINVAL;
CHECK_EQ(0, (uptr)child_stack % 16);
More information about the llvm-commits
mailing list