HomePhabricator

[Sanitizer][RISCV] Fix internal_clone

Authored by luismarques on Mar 8 2021, 2:28 PM.

Description

[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

Details

Committed
luismarquesMar 8 2021, 2:29 PM
Differential Revision
D96954: [Sanitizer][RISCV] Fix internal_clone
Parents
rG8d79b0536796: Add intrinsics_gen as a dependency of libRemarks
Branches
Unknown
Tags
Unknown