From e1c4d88b46409bb1b3835d7a8960e5ae6a51cd8b Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 20 Apr 2021 05:48:08 +0000 Subject: [PATCH] Bug 1705727 - Disable tail call tests in TestStackWalk for code-coverage builds. r=gerald Differential Revision: https://phabricator.services.mozilla.com/D112689 --- mozglue/tests/gtest/TestStackWalk.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mozglue/tests/gtest/TestStackWalk.cpp b/mozglue/tests/gtest/TestStackWalk.cpp index 8c842c3a3a0d..064d5abfa4c4 100644 --- a/mozglue/tests/gtest/TestStackWalk.cpp +++ b/mozglue/tests/gtest/TestStackWalk.cpp @@ -24,11 +24,13 @@ struct CallInfo { bool mTailCall; bool TailCall() { -#ifdef __i386__ +#if defined(__i386__) || defined(MOZ_CODE_COVERAGE) // We can't make tail calls happen on i386 because all arguments to // functions are on the stack, so the stack pointer needs to be updated // before the call and restored after the call, so tail call optimization // never happens. + // Similarly, code-coverage flags don't guarantee that tail call + // optimization will happen. return false; #else return mTailCall;