-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs.rmSync('速') crash without throw #56049
Comments
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 (With the amount of crashes reported for this bug on Windows, I start to feel that we might as well should just forbid |
I recommend forbidding std::filesystem::path as well. It's not worth it. |
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
To use |
I 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. |
Update fs.rmSync to properly handle file paths that include non-ASCII characters. This change prevents crashes and errors when attempting to delete files with international or special characters in their names. Add a test in test/parallel to ensure that files with non-ASCII characters can be deleted without issues, covering cases that previously led to unexpected behavior or crashes on certain file systems. Fixes: nodejs#56049
Of course. Go for it. |
Do we need to do an extensive check to see if there are other places with similar problems? |
Update fs.rmSync to properly handle file paths that include non-ASCII characters. This change prevents crashes and errors when attempting to delete files with international or special characters in their names. Add a test in test/parallel to ensure that files with non-ASCII characters can be deleted without issues. This covers cases that previously caused unexpected behavior or crashes on certain file systems. Fixes: nodejs#56049
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.
The text was updated successfully, but these errors were encountered: