-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Segmentation Fault When Passing Paths with Japanese Characters to createRequire in Node.js 22+ #56650
Comments
I have confirmed that the following changes will be processed as intended in the SJIS(cp932) environment. |
3 tasks
Lines 347 to 348 in 009d53e
I followed it in the debugger and it seems to throw an exception when creating this path object. |
yamachu
added a commit
to yamachu/node
that referenced
this issue
Jan 19, 2025
Enforce that it is u8 because it was crashing when loading files containing Japanese in Windows, cp392 environment. Fixes: nodejs#56650
yamachu
added a commit
to yamachu/node
that referenced
this issue
Jan 19, 2025
Enforce that it is u8 because it was crashing when loading files containing Japanese in Windows, cp392 environment. Fixes: nodejs#56650
yamachu
added a commit
to yamachu/node
that referenced
this issue
Jan 19, 2025
Enforce that it is u8 because it was crashing when loading files containing Japanese in Windows, cp392 environment. Fixes: nodejs#56650
yamachu
added a commit
to yamachu/node
that referenced
this issue
Jan 19, 2025
Enforce that it is u8 because it was crashing when loading files containing Japanese in Windows, cp392 environment. Fixes: nodejs#56650
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v22.13.0
Platform
Subsystem
No response
What steps will reproduce the bug?
Create required files
Create main.js
Run
How often does it reproduce? Is there a required condition?
It is always reproduced when Node v22 is used under Windows in a Japanese environment.
Segmentation fault does not occur depending on the file name passed.
Not reproduced in Node v20.
What is the expected behavior? Why is that the expected behavior?
No segmentation fault shall occur.
This is expected to be fixed, since tools such as eslint cannot be used if files containing Japanese characters exist, since the same processing as the reproduced code is performed inside eslint.
What do you see instead?
No output
Additional information
It's repro repository.
https://github.com/yamachu/node-require-japanese-repro
And
Node 22.2.0 Passed
Node 22.3.0 Failed
https://nodejs.org/download/nightly/v23.0.0-nightly20240521786cb42956/ is Passed
https://nodejs.org/download/nightly/v23.0.0-nightly202405224a54a80aa3/ is Failed
786cb42...4a54a80
The text was updated successfully, but these errors were encountered: