[PATCH] D66870: [Sanitizers] Add support for RISC-V 64-bit
Andreas Schwab via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 3 02:27:57 PDT 2019
schwab marked 2 inline comments as done.
schwab added inline comments.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp:411
+#if defined(__riscv)
+ return internal_syscall(SYSCALL(renameat2), AT_FDCWD, (uptr)oldpath, AT_FDCWD,
+ (uptr)newpath, 0);
----------------
lenary wrote:
> What's the justification here? I'm not familiar with the sanitizer syscall interface, but it would be good to have a comment explaining why risc-v is the only architecture that doesn't use `rename` or `renameat`.
renameat is obsolete, renameat2 is the new generic default.
================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h:100
const unsigned struct_kernel_stat64_sz = 104;
+#elif defined(__riscv) && __riscv_xlen == 64
+ const unsigned struct_kernel_stat_sz = 128;
----------------
lenary wrote:
> Please can you confirm that this will cause build errors if `__riscv_xlen` is 32 (like it will in `sanitizer_platform_limits_posix.cpp`)?
A definition of struct_kernel_stat_sz and struct_kernel_stat64_sz is required. That's how you find out that this needs porting.
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66870/new/
https://reviews.llvm.org/D66870
More information about the llvm-commits
mailing list