Bug 1417772 - Skip testcases in TestAssemblyFunctions in CCov build. r=handyman

Our detour cannot handle assembly patterns which is injected by the code coverage
instrumentation.  We need to skip them in CCov build.

Differential Revision: https://phabricator.services.mozilla.com/D54745

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Toshihito Kikuchi 2019-11-26 17:39:25 +00:00
Родитель a4e8065185
Коммит 952d5f6b7e
1 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -702,17 +702,21 @@ bool TestAssemblyFunctions() {
: functionName(aFunctionName), expectedStub(aExpectedStub) {}
} testCases[] = {
#if defined(__clang__)
# if defined(_M_X64)
// We disable these testcases because the code coverage instrumentation injects
// code in a way that WindowsDllInterceptor doesn't understand.
# ifndef MOZ_CODE_COVERAGE
# if defined(_M_X64)
// Since we have PatchIfTargetIsRecognizedTrampoline for x64, we expect the
// original jump destination is returned as a stub.
TestCase("MovPushRet", JumpDestination),
TestCase("MovRaxJump", JumpDestination),
# elif defined(_M_IX86)
# elif defined(_M_IX86)
// Skip the stub address check as we always generate a trampoline for x86.
TestCase("PushRet", NoStubAddressCheck),
TestCase("MovEaxJump", NoStubAddressCheck),
# endif
#endif
# endif
# endif // MOZ_CODE_COVERAGE
#endif // defined(__clang__)
};
static const auto patchedFunction = []() { patched_func_called = true; };