Skip to content

Conversation

@kxxt
Copy link
Contributor

@kxxt kxxt commented Feb 4, 2026

Original commit message:

[riscv] Fix sp handling in MacroAssembler::LeaveFrame

Keep sp <= fp to ensure that data right above fp doesn't get clobbered
by an inopportune signal and its handler.

Such clobbering can happen in e.g. Node.js when JIT-compiled code is
interrupted by a SIGCHLD handler.

Bug: None
Change-Id: Ief0836032ada7942e89f081f7605f61632c4d414
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7540554
Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
Commit-Queue: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#105069}

Refs: v8/v8@6a0a25a

This V8 backport fixes a long-standing heisenbug that affects riscv64 since at least node.js 16.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Feb 4, 2026
kxxt added a commit to kxxt/archriscv-packages that referenced this pull request Feb 4, 2026
- Backport chromium-review.googlesource.com/c/v8/v8/+/7540554 to fix the
  long-standing nodejs heisenbug Sporadic Nodejs segfault on sg2042 revyos/revyos#27.
  Upstream PR: nodejs/node#61670
- `--nocheck` is needed. There is one test failure:

    === release test-repl-paste-big-data ===
    Path: parallel/test-repl-paste-big-data
    node:internal/assert/utils:77
        throw err;
        ^

    AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

      assert.ok(diff.user < 1e6)

        at REPLServer.<anonymous> (/build/nodejs-lts-krypton/src/node/test/parallel/test-repl-paste-big-data.js:22:10)
        at REPLServer.<anonymous> (/build/nodejs-lts-krypton/src/node/test/common/index.js:476:15)
        at Object.onceWrapper (node:events:622:28)
        at REPLServer.emit (node:events:508:28)
        at REPLServer.emit (node:domain:489:12)
        at REPLServer.emitExit (node:repl:850:10)
        at REPLServer.emit (node:events:520:35)
        at REPLServer.emit (node:domain:489:12)
        at REPLServer.close (node:internal/readline/interface:555:10)
        at node:repl:1114:5 {
      generatedMessage: true,
      code: 'ERR_ASSERTION',
      actual: false,
      expected: true,
      operator: '==',
      diff: 'simple'
    }

    Node.js v24.13.0
    Command: out/Release/node /build/nodejs-lts-krypton/src/node/test/parallel/test-repl-paste-big-data.js
Original commit message:

    [riscv] Fix sp handling in MacroAssembler::LeaveFrame

    Keep sp <= fp to ensure that data right above fp doesn't get clobbered
    by an inopportune signal and its handler.

    Such clobbering can happen in e.g. Node.js when JIT-compiled code is
    interrupted by a SIGCHLD handler.

    Bug: None
    Change-Id: Ief0836032ada7942e89f081f7605f61632c4d414
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7540554
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Commit-Queue: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#105069}

Refs: v8/v8@6a0a25a
Co-authored-by: kxxt <rsworktech@outlook.com>
@aduh95 aduh95 added the blocked PRs that are blocked by other issues or PRs. label Feb 4, 2026
@aduh95
Copy link
Contributor

aduh95 commented Feb 4, 2026

Blocked on #61666

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked PRs that are blocked by other issues or PRs. build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants