|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Clemens Backes < [email protected]> |
| 3 | +Date: Thu, 2 Feb 2023 14:38:14 +0100 |
| 4 | +Subject: Disable the use of preserve_most on arm64 Windows |
| 5 | + |
| 6 | +We see crashes on arm64 on Windows. Disable the use of preserve_most |
| 7 | +there, until we figure out (and fix) the root cause. |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +Bug: chromium:1409934 |
| 12 | +Change-Id: Ic913039d36d158fb5ad368915d95c250d8724a07 |
| 13 | +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4218354 |
| 14 | +Commit-Queue: Clemens Backes < [email protected]> |
| 15 | +Reviewed-by: Michael Lippautz < [email protected]> |
| 16 | +Cr-Commit-Position: refs/heads/main@{#85634} |
| 17 | +(cherry picked from commit e33c3a09b31af5b69286f904a378fcbfb36a726d) |
| 18 | + |
| 19 | +diff --git a/include/v8config.h b/include/v8config.h |
| 20 | +index fd762d87f5ebd32ccb23ff0c6383a37a5093ac78..6cffeaa5ad21826123c8dda487fc6c65b7d03ed2 100644 |
| 21 | +--- a/include/v8config.h |
| 22 | ++++ b/include/v8config.h |
| 23 | +@@ -346,12 +346,15 @@ path. Add it with -I<path> to the command line |
| 24 | + # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull)) |
| 25 | + # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline)) |
| 26 | + # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused)) |
| 27 | +-// Support for the "preserve_most" attribute is incomplete on 32-bit, and we see |
| 28 | +-// failures in component builds. Thus only use it in 64-bit non-component builds |
| 29 | +-// for now. |
| 30 | +-#if (defined(_M_X64) || defined(__x86_64__) || defined(__AARCH64EL__) || \ |
| 31 | +- defined(_M_ARM64)) /* x64 or arm64 */ \ |
| 32 | +- && !defined(COMPONENT_BUILD) |
| 33 | ++// Support for the "preserve_most" attribute is limited: |
| 34 | ++// - 32-bit platforms do not implement it, |
| 35 | ++// - component builds fail because _dl_runtime_resolve clobbers registers, |
| 36 | ++// - we see crashes on arm64 on Windows (https://crbug.com/1409934), which can |
| 37 | ++// hopefully be fixed in the future. |
| 38 | ++#if (defined(_M_X64) || defined(__x86_64__) /* x64 (everywhere) */ \ |
| 39 | ++ || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */ \ |
| 40 | ++ && !defined(_WIN32))) /* not on windows */ \ |
| 41 | ++ && !defined(COMPONENT_BUILD) /* no component build */ |
| 42 | + # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most)) |
| 43 | + #endif |
| 44 | + # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility)) |
0 commit comments