build: riscv64 Clang 19 build fails in V8 MutablePage cache-line assertion

未关闭
#67,428 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript, linux
领域
build-system

调研方向

Start with deps/v8/src/heap/mutable-page.cc at the failing static assertion, then inspect the definitions of the fast-field offsets and hardware_destructive_interference_size for the riscv64 build. Reproduce with the reported configure and make commands on riscv64 using Clang 19. Done means the build proceeds past this assertion while preserving the intended cache-line layout checks.

由索引模型根据 Issue 内容生成。

描述

riscv64 v8 engine
Version

Node.js master branch (upstream origin/master, tested on November 6, 2026; exact commit not record).

Platform
Linux v100-001 7.0.0-42-generic #42.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 16 15:53:30 UTC 2026 riscv64 GNU/Linux
Subsystem

v8

What steps will reproduce the bug?
    ./configure --error-on-warn --v8-enable-temporal-support 
    make -j"$(getconf _NPROCESSORS_ONLN)" 
    make test-ci -j1 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9
How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

Build and test will be passed.

What do you see instead?

But it fail to build on this riscv64 hardware

#8 1157.2   132 | # define _GLIBCXX20_DEPRECATED_SUGGEST(ALT) _GLIBCXX_DEPRECATED_SUGGEST(ALT)
#8 1157.2       |                                             ^
#8 1157.2 /usr/lib/gcc/riscv64-linux-gnu/14/../../../../include/riscv64-linux-gnu/c++/14/bits/c++config.h:100:19: note: expanded from macro '_GLIBCXX_DEPRECATED_SUGGEST'
#8 1157.2   100 |   __attribute__ ((__deprecated__ ("use '" ALT "' instead")))
#8 1157.2       |                   ^
#8 1157.3   CXX(target) /home/jenkins/node/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/ic/ic-stats.o
#8 1157.6 2 warnings generated.
#8 1157.8   CXX(target) /home/jenkins/node/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/ic/ic.o
#8 1158.0 ../deps/v8/src/heap/mutable-page.cc:53:7: error: static assertion failed due to requirement 'kOffsetOfFirstFastField / std::hardware_destructive_interference_size == kOffsetOfLastFastField / std::hardware_destructive_interference_size'
#8 1158.0    53 |       kOffsetOfFirstFastField / std::hardware_destructive_interference_size ==
#8 1158.0       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 1158.0    54 |       kOffsetOfLastFastField / std::hardware_destructive_interference_size);
#8 1158.0       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 1158.0 ../deps/v8/src/heap/mutable-page.cc:53:77: note: expression evaluates to '2 == 3'
#8 1158.0    53 |       kOffsetOfFirstFastField / std::hardware_destructive_interference_size ==
#8 1158.0       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
#8 1158.0    54 |       kOffsetOfLastFastField / std::hardware_destructive_interference_size);
#8 1158.0       |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#8 1158.2 In file included from ../deps/v8/src/heap/minor-mark-sweep.cc:5:

see the log.

Additional information

While bringing up a Nodejs CI job on native riscv64 hardware, we encountered a build failure in the bundled V8. With Clang 19 on Debian Trixie, the cache-line locality assertion in deps/v8/src/heap/mutable-page.cc fails, with the expression evaluating to 2 == 3. The build stops before tests can run.

Is this a known layout limitation for native riscv64 builds, or should the assertion/layout be adjusted for this configuration?

主要语言
JavaScript
星标
124k
派生
38k
平均合并
4 天 2 小时
30 天内合并 PR
266

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nodejs/node 的其他 Issue

查看 nodejs/node 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。