[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default
Hyeongyu Kim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 1 06:50:38 PDT 2021
hyeongyukim added a comment.
I checked the reason for failure in address sanitizer tests on the 2-stage aarch64 buildbots.
The buildbot failure was occured because the `internal_clone` function of the `compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp` file is being compiled incorrectly.
The `internal_clone` function is a simple function that calls the clone system call of Linux. Its original return value should be the PID of the newly created process, but the actual returned value is 220 (which is the `__NR_clone` value.)
The aarch64 assembly changed by this patch is as follows.
// before
84: d2801b88 mov x8, #0xdc // #0xdc(220): system call number of clone
88: d4000001 svc #0x0 // system call
...
a4: a9434ff4 ldp x20, x19, [sp, #48]
a8: a94257f6 ldp x22, x21, [sp, #32]
ac: a9415ff8 ldp x24, x23, [sp, #16]
b0: a8c467fe ldp x30, x25, [sp], #64
b4: d65f03c0 ret
=========================
// after
88: d2801b88 mov x8, #0xdc // #0xdc(220): system call number of clone
8c: d4000001 svc #0x0 // system call
...
a8: a9434ff4 ldp x20, x19, [sp, #48]
ac: aa0803e0 mov x0, x8 // return value(x0) was overwritten by 0xdc(220)
b0: a94257f6 ldp x22, x21, [sp, #32]
b4: a9415ff8 ldp x24, x23, [sp, #16]
b8: a8c467fe ldp x30, x25, [sp], #64
bc: d65f03c0 ret
Does anyone know why the `internal_clone` function of aarch64 is affected by this patch?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105169/new/
https://reviews.llvm.org/D105169
More information about the cfe-commits
mailing list