From 5beb42fe2253dca47530a71ed087b427db22fc17 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 12 Apr 2023 13:08:58 -0700 Subject: [PATCH] Temporarily disable shadow call stack for riscv64. We're trying to switch from x18 to gp for shadow call stack, ideally without breaking anything, so let's disable shadow call stack while we rearrange things behind the scenes... Bug: http://b/277909695 Test: treehugger Change-Id: Ic1a6bceaf0ab20dc66e1903747ebb668232a253a --- cc/sanitize.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cc/sanitize.go b/cc/sanitize.go index f19659cc7..8fb7cbce2 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -613,6 +613,10 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) { if (ctx.Arch().ArchType != android.Arm64 && ctx.Arch().ArchType != android.Riscv64) || !ctx.toolchain().Bionic() { s.Scs = nil } + // ...but temporarily globally disabled on riscv64 (http://b/277909695). + if ctx.Arch().ArchType == android.Riscv64 { + s.Scs = nil + } // Memtag_heap is only implemented on AArch64. // Memtag ABI is Android specific for now, so disable for host.