Merge "Simplify the malloc_debug unwind."
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 18e8bbc..f56e16a 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -83,5 +83,10 @@
     {
       "name": "toybox-tests"
     }
+  ],
+  "kernel-presubmit": [
+    {
+      "name": "CtsBionicTestCases"
+    }
   ]
 }
diff --git a/libc/bionic/android_unsafe_frame_pointer_chase.cpp b/libc/bionic/android_unsafe_frame_pointer_chase.cpp
index a1cb3c6..1a59718 100644
--- a/libc/bionic/android_unsafe_frame_pointer_chase.cpp
+++ b/libc/bionic/android_unsafe_frame_pointer_chase.cpp
@@ -72,7 +72,13 @@
 
   size_t num_frames = 0;
   while (1) {
+#if defined(__riscv)
+    // Frame addresses seem to have been implemented incorrectly for RISC-V.
+    // See https://reviews.llvm.org/D87579.
+    auto* frame = reinterpret_cast<frame_record*>(begin - 16);
+#else
     auto* frame = reinterpret_cast<frame_record*>(begin);
+#endif
     if (num_frames < num_entries) {
       buf[num_frames] = __bionic_clear_pac_bits(frame->return_addr);
     }