From e33c3a09b31af5b69286f904a378fcbfb36a726d Mon Sep 17 00:00:00 2001 From: Clemens Backes Date: Thu, 2 Feb 2023 14:38:14 +0100 Subject: [PATCH] Disable the use of preserve_most on arm64 Windows We see crashes on arm64 on Windows. Disable the use of preserve_most there, until we figure out (and fix) the root cause. R=mlippautz@chromium.org Bug: chromium:1409934 Change-Id: Ic913039d36d158fb5ad368915d95c250d8724a07 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218354 Commit-Queue: Clemens Backes Reviewed-by: Michael Lippautz Cr-Commit-Position: refs/heads/main@{#85634} --- include/v8config.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/include/v8config.h b/include/v8config.h index a967d92c39..b44995e7cd 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -346,12 +346,15 @@ path. Add it with -I to the command line # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull)) # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline)) # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused)) -// Support for the "preserve_most" attribute is incomplete on 32-bit, and we see -// failures in component builds. Thus only use it in 64-bit non-component builds -// for now. -#if (defined(_M_X64) || defined(__x86_64__) || defined(__AARCH64EL__) || \ - defined(_M_ARM64)) /* x64 or arm64 */ \ - && !defined(COMPONENT_BUILD) +// Support for the "preserve_most" attribute is limited: +// - 32-bit platforms do not implement it, +// - component builds fail because _dl_runtime_resolve clobbers registers, +// - we see crashes on arm64 on Windows (https://crbug.com/1409934), which can +// hopefully be fixed in the future. +#if (defined(_M_X64) || defined(__x86_64__) /* x64 (everywhere) */ \ + || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */ \ + && !defined(_WIN32))) /* not on windows */ \ + && !defined(COMPONENT_BUILD) /* no component build */ # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most)) #endif # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))