Repository navigation
fs.rmSync('速') crash without throw #56049
Description
Activity
- addedfsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
on Nov 28, 2024 It might be related to #55773.
v22.11.0 is OK, but v23.0.0 also has problems.
This seems, once again, a problem from using
std::filesystem::pathon Windows, and wasn't taken care of as part of #55015 (cc @anonrig who authored #53617). See #53063 (comment) on an explanation about this class of bugs.(With the amount of crashes reported for this bug on Windows, I start to feel that we might as well should just forbid
std::filesystem::pathin the code base unless it's absolutely justified, as it's so easy to miss the encoding inconsistency on Windows.....)Reacted by jakecastelliI recommend forbidding std::filesystem::path as well. It's not worth it.
- addedwindowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
on Nov 30, 2024 - addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
on Dec 2, 2024 It seems no one is working on it yet, so marking it as good first issue. See #53063 (comment) on how this sort of bug happens and how they can be fixed. In this case I believe one just needs to change
Lines 1629 to 1630 in 56e5bd8
env, permission::PermissionScope::kFileSystemWrite, path.ToStringView()); auto file_path = std::filesystem::path(path.ToStringView()); To use
ToU8StringView()instead, since the call was actually changed to usestd::filesystemcalls, which only takesstd::filesystem::paths.Reacted by kanasimiI will give it a try
@geeksilva97 I would like to try this if you haven't done it yet. I started building with the suggested change and will write the test to check. This would be my first contribution here. Thank you.
@geeksilva97 I would like to try this if you haven't done it yet. I started building with the suggested change and will write the test to check. This would be my first contribution here. Thank you.
Of course. Go for it.
Reacted by YeaseenDo we need to do an extensive check to see if there are other places with similar problems?
jimmywarting commented
on Dec 12, 2024 on Dec 12, 2024 · Hidden as off-topicshow commentMore actions- added a commit that references this issue
on Dec 28, 2025 - added 2 commits that reference this issue
on Jan 9, 2026 - added a commit that references this issue
on Jan 13, 2026 - added a commit that references this issue
on Jan 19, 2026 - added a commit that references this issue
on Aug 25, 2026 - added a commit that references this issue
on Sep 17, 2026 - added a commit that references this issue
on Sep 18, 2026
Version
23.3.0
Platform
Subsystem
No response
What steps will reproduce the bug?
When
fs.rmSync('速')files with name containing “速”, node 23.3.0 will crash without throw.How often does it reproduce? Is there a required condition?
Everytime
What is the expected behavior? Why is that the expected behavior?
Delete the file normally.
What do you see instead?
The program just crashed.
Additional information
There are other special characters that can cause similar problems, such as “請”. This problem did not occur in previous versions.