Repository navigation
Backlog
Labels
riscv64Issues and PRs related to the 64-bit RISC-V architecture.
Description
Two separate problems with Node.js v24 on a RISC-V 64 core with the V extension. Both look like V8 riscv64 issues; could the maintainers route them to V8 as needed? Node v22 (V8 12.4) on the same machine runs both repros fine.
Environment
- CPU: SpacemiT X100 (rv64gcv, Zba/Zbb/Zbs, sv39 MMU)
- Kernel: Linux 6.18.3; distro glibc 2.43; gcc 15.2.0
- Node: v24.22.3 (V8 13.6.x)
- the unofficial-builds
node-v24.22.3-linux-riscv64.tar.xz(checksum matches its SHASUMS256.txt), and - a native build of the official, signature-verified
node-v24.22.3.tar.xzwith the default./configure(leaptiering on, pointer compression off).
- the unofficial-builds
- Control: Node v22.22.1 (distro package) on the same machine has neither problem.
Bug 1: any JavaScript segfaults (Sparkplug baseline code)
Repro
$ node -e 1
Segmentation fault (exit 139)
Flag matrix (both binaries)
- Runs (exit 0):
--jitless,--no-sparkplug,--always-sparkplug. - Still crashes: default,
--no-opt,--max-lazy,--no-baseline-batch-compilation(also with batch compilation compiled off by default),--no-concurrent-sparkplug,--single-threaded,--short-builtin-calls,--no-short-builtin-calls,--riscv-b-extension,--no-riscv-b-extension,--riscv-c-extension,--no-riscv-c-extension,--no-riscv-constant-pool,--sparkplug --no-lazy-feedback-allocation.
Crash site
Captured with a SIGSEGV handler (gdb unavailable). On the native build, which is not stripped:
- pc in
v8::internal::Runtime_InstallBaselineCode(int, unsigned long*, v8::internal::Isolate*); - ra in
Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit; - fault address
0x20000001fon both binaries. That reads as Smi 2 (0x200000000, 32-bit-shifted Smi with pointer compression off) dereferenced as a HeapObject at field offset+0x1f. So the runtime function appears to receive a Smi whereargs[0]should be the JSFunction.
Things ruled out
- Zba/Zbb/Zbs codegen: hiding Zba/Zbb/Zbs from V8 by masking
riscv_hwproberesults (V8 then reportszba=0, zbb=0, zbs=0) still crashes. - Leaptiering could not be isolated: building with
v8_enable_leaptiering=0for riscv64 doesn't compile:It's in thedeps/v8/src/codegen/riscv/macro-assembler-riscv.cc:276:57: error: 'temps' was not declared in this scope#ifndef V8_ENABLE_LEAPTIERINGtiering path:tempsis declared inside the preceding block, butTailCallOptimizedCodeSlot(..., temps.Acquire(), temps.Acquire())uses it after the block closes.
Bug 2: global fetch fails; WebAssembly SIMD (RVV) gives wrong results
Repro (with --no-sparkplug to get past bug 1)
$ node --no-sparkplug -e 'fetch("https://registry.npmjs.org/-/ping").then(r=>console.log(r.status)).catch(e=>console.log(String(e.cause)))'
HTTPParserError: Response does not match the HTTP/1.1 protocol (Invalid header value char)
Node v22 prints 200.
- Unchanged with
--no-liftoffor--no-wasm-tier-up. - Works (200) with:
- undici forced onto its non-SIMD llhttp Wasm module;
- the V extension (
RISCV_HWPROBE_IMA_V) masked from V8 viariscv_hwprobe; - a native build with
RISCV_SIMDcleared inCpuFeatures::ProbeImpl(WebAssembly.validate()of a SIMD module then returnsfalse). 3 of 3 runs returned 200.
So V8's RVV lowering of Wasm SIMD128 appears to produce wrong results on this core, exercised by llhttp's SIMD parser.
Not checked
- Newer V8 versions.
- A V8 debug build under gdb.
- Other RVV 1.0 cores, which would tell a core erratum apart from a V8 bug.
I'm happy to run test builds or patches on this hardware.
Metadata
Metadata
Assignees
Labels
riscv64Issues and PRs related to the 64-bit RISC-V architecture.
Activity
Renegade334 commentedon Dec 1, 2026
This half is a duplicate of #67655, it looks like the unofficial builds for v24.23.0 are still cooking, so suggest you re-test once these are published.