Skip to content

Commit

Permalink
[sanitizer][aarch64] fix clone system call's inline assembly
Browse files Browse the repository at this point in the history
Return value of the system call was not returned normally.
It was discussed at https://reviews.llvm.org/D105169.
  • Loading branch information
hyeongyukim committed Nov 14, 2021
1 parent e56d680 commit 7f7cab6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 7f7cab6

Please sign in to comment.