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

Aberta
#64,538 36 comentários 1 reação 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
javascript, linux, node.js

Direção de pesquisa

Reproduza com npm ou node-gyp em um SpacemiT-K3 com riscv64 Linux e compare com um K1; verifique também o caminho build-addons executado por make run-ci. Leia a alteração de instruções vetoriais do V8 de361fd2544a89c0c94fd820f987378edbb98fce junto com o workaround relatado 1ecdd388f13391c55cffd9aea580770e1d26a952. Considera-se concluído quando esses comandos não causarem mais Illegal Instruction no K3 sem introduzir regressões no K1.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
JavaScript
Estrelas
122k
Forks
37.4k
Merge médio
4d 3h
PRs com merge (30d)
272

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de nodejs/node

Todas as issues de nodejs/node

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.