Article View: linux.debian.bugs.rc
Article #1603Bug#1151837: FTBFS: on riscv64: Can't determine the arch of: 'out/Release/node'
From: Aurelien Jarno
Date: Sat, 24 Oct 2026 09:30
Date: Sat, 24 Oct 2026 09:30
111 lines
6469 bytes
6469 bytes
On 2026-10-23 21:25, Aurelien Jarno wrote:
> Source: nodejs
> Version: 24.22.0+dfsg+~cs24.19.2-2
> Severity: serious
> Tags: ftbfs upstream
> Justification: fails to build from source (but built successfully in the past)
> X-Debbugs-Cc: debian-riscv@lists.debian.org
> User: debian-riscv@lists.debian.org
> Usertags: riscv64
>
> Dear maintainer,
>
> As you surely have noticed, the latest version of nodejs fails to build
> on riscv64. It fails with:
...
> I have rebuilt version 24.21.0+dfsg+~cs24.13.4-1 in the same
> environment, and it works fine, so the issue is not due to a dependency.
>
> I have also been able to reproduce the issue with upstream tag v24.22.0
> as well as v24.22.1. On the other hand upstream tag v24.21.0 works fine,
> so the issue is not due to a debian change.
>
> I have started bisecting, but it will take some time.
Here is the result:
| fb0d0ca28993802d67360edc84d467fe3ccdc20b is the first 'bad' commit
| commit fb0d0ca28993802d67360edc84d467fe3ccdc20b (HEAD)
| Author: Ruan Gustavo <dev.ruangustavo@gmail.com>
| Date: Wed Sep 2 22:00:20 2026 -0300
|
| deps: V8: backport 0b94a9fd23ba
|
| Original commit message:
|
| [leaptiering] Fix BaselineOutOfLinePrologue builtin
|
| ... which tried to preserve kJavaScriptCallDispatchHandleRegister even
| on configurations where it's not used which resulted in a random value
| on the stack discoverable by GC.
| This issue triggered only on non-sandbox configuration with enabled
| leaptiering.
|
| Drive-by: fix MacroAssembler::GenerateTailCallToReturnedCode() on riscv
| port which wasn't preserving dispatch handle as all the other ports do.
|
| Bug: 42204201
| Fixed: 413769394
|
| Change-Id: If146b0b7a6cf972ed5a881142f40980774f19cba
| Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6587010
| Commit-Queue: Igor Sheludko <ishell@chromium.org>
| Reviewed-by: Olivier Flückiger <olivf@chromium.org>
| Cr-Commit-Position: refs/heads/main@{#100512}
|
| Node.js 24 builds V8 with leaptiering enabled and the sandbox disabled,
| so V8_JS_LINKAGE_INCLUDES_DISPATCH_HANDLE is not defined and the JS
| calling convention does not carry the dispatch handle register (x4 on
| arm64). BaselineOutOfLinePrologue and GenerateTailCallToReturnedCode
| still pushed that register as a tagged slot of an INTERNAL frame, so
| whatever value the caller left there is dereferenced by
| ClearStaleLeftTrimmedPointerVisitor during mark-compact root scanning
| and crashes the process with SIGSEGV (seen as jest workers dying).
|
| Refs: https://github.com/v8/v8/commit/0b94a9fd23ba5f59b3f675fb04d60a9b0102e27d
| Fixes: https://github.com/nodejs/node/issues/62393
| PR-URL: https://github.com/nodejs/node/pull/65753
| Reviewed-By: Richard Lau <richard.lau@ibm.com>
|
| common.gypi | 2 +-
| deps/v8/src/builtins/arm64/builtins-arm64.cc | 3 ++-
| deps/v8/src/builtins/loong64/builtins-loong64.cc | 5 +++--
| deps/v8/src/builtins/mips64/builtins-mips64.cc | 5 +++--
| deps/v8/src/builtins/riscv/builtins-riscv.cc | 7 +++++--
| deps/v8/src/builtins/x64/builtins-x64.cc | 5 +++--
| deps/v8/src/codegen/arm64/macro-assembler-arm64.cc | 11 ++++++-----
| deps/v8/src/codegen/loong64/macro-assembler-loong64.cc | 5 +++--
| deps/v8/src/codegen/mips64/macro-assembler-mips64.cc | 5 +++--
| deps/v8/src/codegen/riscv/macro-assembler-riscv.cc | 18 +++++++++++++++---
| deps/v8/src/codegen/x64/macro-assembler-x64.cc | 5 +++--
| 11 files changed, 47 insertions(+), 24 deletions(-)
I have tested that reverting that commit on upstream v24.22.1 or on the
Debian package fix the issue. I still need to understand what is broken,
any help is welcome.
Regards
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
Technical Details
Message-ID:
<NRGeB-7zus-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomodReferences:
<NRt7H-7s9c-1@gated-at.bofh.it> <NRt7H-7s9c-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Aurelien Jarno <aurel32@debian.org> Newsgroups: linux.debian.bugs.rc Subject: Bug#1151837: FTBFS: on riscv64: Can't determine the arch of: 'out/Release/node' Date: Sat, 24 Oct 2026 11:30:01 +0200 Message-ID: <NRGeB-7zus-1@gated-at.bofh.it> References: <NRt7H-7s9c-1@gated-at.bofh.it> <NRt7H-7s9c-1@gated-at.bofh.it> X-Original-To: Debian Javascript Maintainers <pkg-javascript-devel@alioth-lists.debian.net> X-Mailbox-Line: From debian-bugs-rc-request@lists.debian.org Sat Oct 24 09:27:15 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.699 Reply-To: Aurelien Jarno <aurel32@debian.org>, 1151837@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: pkg-javascript-devel@alioth-lists.debian.net X-Debian-Pr-Message: followup 1151837 X-Debian-Pr-Package: src:nodejs X-Debian-Pr-Keywords: ftbfs upstream X-Debian-Pr-Source: nodejs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/2.4.1 (2026-07-04) X-Debian-User: aurel32 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-rc@lists.debian.org> archive/latest/835886 List-ID: <debian-bugs-rc.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-rc/> Approved: robomod@news.nic.it Lines: 111 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: 1151837@bugs.debian.org X-Original-Date: Sat, 24 Oct 2026 11:24:38 +0200 X-Original-Message-ID: <atx5Vr9ozD_3ViYT@aurel32.net> X-Original-References: <179278351052.3412872.13236708768802255410.reportbug@ohm.local> <179278351052.3412872.13236708768802255410.reportbug@ohm.local>