[Sanitizer][RISCV] Fix internal_clone
A RISC-V implementation of `internal_clone` was introduced in D87573, as part of the RISC-V ASan patch set by @EccoTheDolphin. That function was never used/tested until I ported LSan for RISC-V, as part of D92403. That port revealed problems in the original implementation, so I provided a fix in D92403. Unfortunately, my choice of replacing the assembly with regular C++ code wasn't correct. The clone syscall arguments specify a separate stack, so non-inlined calls, spills, etc. aren't going to work. This wasn't a problem in practice for optimized builds of Compiler-RT, but it breaks for debug builds. This patch fixes the original problem while keeping the assembly. Differential Revision: https://reviews.llvm.org/D96954
Loading
Please sign in to comment