Skip to content

[22 regression] Infinite recursion when setting stat.atime #52705

Closed
@nicolo-ribaudo

Description

@nicolo-ribaudo

Version

v22.0.0

Platform

Linux

Subsystem

fs

What steps will reproduce the bug?

var fs = requre("fs");
var stat = fs.statSync("./package.json")
stat.atime = 2

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

Always

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

It should work

What do you see instead?

It throws

Uncaught RangeError: Maximum call stack size exceeded
    at Stats.set [as atime] (node:internal/fs/utils:469:18)
    at Stats.set [as atime] (node:internal/fs/utils:469:18)
    at Stats.set [as atime] (node:internal/fs/utils:469:18)
    at Stats.set [as atime] (node:internal/fs/utils:469:18)
    at Stats.set [as atime] (node:internal/fs/utils:469:18)
    at Stats.set [as atime] (node:internal/fs/utils:469:18)
    at Stats.set [as atime] (node:internal/fs/utils:469:18)
    at Stats.set [as atime] (node:internal/fs/utils:469:18)
    at Stats.set [as atime] (node:internal/fs/utils:469:18)

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.fsIssues and PRs related to the fs subsystem / file system.regressionIssues related to regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions