From 0e6d1c90b9057e7b90c07a08843309bc4854111f Mon Sep 17 00:00:00 2001 From: Joey Jiao Date: Thu, 30 Nov 2023 07:34:18 +0530 Subject: [PATCH] Disable stack-depth Port the same setting from build/soong, fuzzer build failed without disable stack-depth Change-Id: I62dbf6a8e3ef92abee79ad14fc3624959847ec33 --- core/config_sanitizers.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 83be00630f..3507961833 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -355,6 +355,12 @@ ifneq ($(filter fuzzer,$(my_sanitize)),) my_sanitize := $(filter-out cfi,$(my_sanitize)) my_cflags += -fno-lto my_ldflags += -fno-lto + + # TODO(b/142430592): Upstream linker scripts for sanitizer runtime libraries + # discard the sancov_lowest_stack symbol, because it's emulated TLS (and thus + # doesn't match the linker script due to the "__emutls_v." prefix). + my_cflags += -fno-sanitize-coverage=stack-depth + my_ldflags += -fno-sanitize-coverage=stack-depth endif ifneq ($(filter integer_overflow,$(my_sanitize)),)