From 97f9fbcfcebab40137a4c1304b9fb37e8be439c6 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Thu, 30 Mar 2023 13:13:00 +0530 Subject: [PATCH] deps: V8: cherry-pick cb30b8e17429 Original commit message: Fix compilation error in platform.h for ASAN The last two operands of the conditional expression needs to be of the same type to compile. Change-Id: Ib6cba4acb1238394910c650c776a7fd1ee93721e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4306802 Commit-Queue: Joyee Cheung Reviewed-by: Michael Lippautz Cr-Commit-Position: refs/heads/main@{#86235} Refs: https://github.com/v8/v8/commit/cb30b8e1742938dff0a24470f24d649b1664f0c2 Refs: https://github.com/nodejs/node/issues/43370 Signed-off-by: Darshan Sen --- common.gypi | 2 +- deps/v8/src/base/platform/platform.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common.gypi b/common.gypi index b1d87780db54c3..6f8518cc8e23a7 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.12', + 'v8_embedder_string': '-node.13', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/base/platform/platform.h b/deps/v8/src/base/platform/platform.h index 88d35540b1d34c..5ffc6e3b1d8efe 100644 --- a/deps/v8/src/base/platform/platform.h +++ b/deps/v8/src/base/platform/platform.h @@ -654,9 +654,9 @@ class V8_BASE_EXPORT Stack { constexpr size_t kAsanRealFrameOffsetBytes = 32; void* real_frame = __asan_addr_is_in_fake_stack( __asan_get_current_fake_stack(), slot, nullptr, nullptr); - return real_frame - ? (static_cast(real_frame) + kAsanRealFrameOffsetBytes) - : slot; + return real_frame ? StackSlot(static_cast(real_frame) + + kAsanRealFrameOffsetBytes) + : slot; #endif // V8_USE_ADDRESS_SANITIZER return slot; }