Skip to content

fs.chown crashes when uid is -1 #58826

Closed
@kt3k

Description

@kt3k

Version

24.3

Platform

Darwin kt3k-mac-2.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:21 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8103 arm64

Subsystem

fs

What steps will reproduce the bug?

Run

import fs from "node:fs";
fs.chown("foo", -1, 501, console.log);

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

always

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

does not crash

What do you see instead?

crashes

Additional information

This didn't happen with Node 24.2

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions