RISC-V: "Illegal instruction" crash when vector instructions detected by V8

未關閉
#64,538 36 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
javascript, linux, node.js

研究方向

在執行 riscv64 Linux 的 SpacemiT-K3 上使用 npm 或 node-gyp 重現,並與 K1 比較;同時檢查由 make run-ci 執行的 build-addons 路徑。將回報的 workaround 1ecdd388f13391c55cffd9aea580770e1d26a952 與 V8 的向量指令變更 de361fd2544a89c0c94fd820f987378edbb98fce 一起閱讀。完成的標準是:這些命令在 K3 上不再引發 Illegal Instruction,且不會導致 K1 回歸。

由索引模型根據 Issue 內容生成。

描述

riscv64 v8 engine
Version

v26.5.0 (but any v26 and above is affected)

Platform
Linux firefly 6.18.3 #2 SMP PREEMPT_DYNAMIC Wed May 13 16:58:11 CST 2026 riscv64 GNU/Linux
Subsystem

V8

What steps will reproduce the bug?

run npm or any node-gyp on a SpacemiT-K3 board. Also fails in the build-addons step with make run-ci as that executes node-gyp. Other boards such as the SpacemiT-K1 do not show the crash (Both should have vector instructions available)

How often does it reproduce? Is there a required condition?

100% of the time

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

There should be no crash when running npm

What do you see instead?

Illegal Instruction

Additional information

Based on the fact that https://github.com/sxa/node/commit/1ecdd388f13391c55cffd9aea580770e1d26a952 fixes it seems likely that this was introduced as part of the vector instructions introduced in https://github.com/v8/v8/commit/de361fd2544a89c0c94fd820f987378edbb98fce - I haven't yet tracked it down to any specific operation in that function. At the moment I've also only determined that it fixes the initial crash and hopefully that doesn' uncover more issues.

FYI @luhenry @luyahan @nodejs/platform-riscv64

Split out from https://github.com/nodejs/build/issues/4099#issuecomment-4935757486

主要語言
JavaScript
星號
122k
分支
37.4k
平均合併
4 天 3 小時
30 天內合併 PR
272

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

nodejs/node 的其他 Issue

查看 nodejs/node 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。