Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
Fixed an issue that caused a segmentation fault when resolving a module in certain environments#56657
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
yamachu commented Jan 19, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Enforce that it is u8 because it was crashing when loading files containing Japanese in Windows, cp392 environment. Fixes: nodejs#56650
lpinca left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RSLGTM
lpinca commented Jan 19, 2025
I guess there is no easy way to add a test, right? |
codecovbot commented Jan 19, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #56657 +/- ## ========================================== - Coverage 89.21% 89.21% -0.01% ========================================== Files 662 662 Lines 191893 191895 +2 Branches 36931 36928 -3 ========================================== - Hits 171196 171191 -5 - Misses 13541 13546 +5 - Partials 7156 7158 +2
|
yamachu commented Jan 20, 2025
Yes. |
yamachu commented Jan 20, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I have succeeded in reproducing the Japanese environment Windows on CI. https://github.com/yamachu/node-require-japanese-repro/actions/runs/12861537170 To prepare a test using this setup in the node repository, I also need a node build workflow for Windows, which is difficult for me... |
lpinca commented Jan 20, 2025
Can you please fix the linting errors? |
yamachu commented Jan 20, 2025
@lpinca I ran make test but forgot to run make lint, sorry. |
This comment was marked as outdated.
This comment was marked as outdated.
yamachu commented Jan 22, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Thank you for the review. Since I was able to create a ja-JP environment with CI, I performed tests using it. Default Windows runner Failed tests: D:\a\node\node\out\Release\node.exe --experimental-vm-modules --max-old-space-size=16 --trace-gc D:\a\node\node\test\es-module\test-vm-source-text-module-leak.js D:\a\node\node\out\Release\node.exe D:\a\node\node\test\parallel\test-child-process-exec-any-shells-windows.js D:\a\node\node\out\Release\node.exe D:\a\node\node\test\parallel\test-inspector-wait-for-connection.js + D:\a\node\node\out\Release\node.exe D:\a\node\node\test\parallel\test-require-unicode.js D:\a\node\node\out\Release\node.exe --expose-internals D:\a\node\node\test\pummel\test-heapdump-inspector.jsSJIS Windows runner Failed tests: D:\a\node\node\out\Release\node.exe --experimental-vm-modules --max-old-space-size=16 --trace-gc D:\a\node\node\test\es-module\test-vm-source-text-module-leak.js D:\a\node\node\out\Release\node.exe D:\a\node\node\test\parallel\test-child-process-exec-any-shells-windows.js - D:\a\node\node\out\Release\node.exe D:\a\node\node\test\parallel\test-module-create-require-multibyte.js D:\a\node\node\out\Release\node.exe D:\a\node\node\test\parallel\test-require-unicode.js D:\a\node\node\out\Release\node.exe D:\a\node\node\test\parallel\test-inspector-wait-for-connection.js D:\a\node\node\out\Release\node.exe --expose-internals D:\a\node\node\test\pummel\test-heapdump-inspector.js |
nodejs-github-bot commented Jan 22, 2025
lpinca commented Jan 23, 2025
yamachu commented Jan 23, 2025
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Take a similar approach to node_file and allow the creation of paths code point must be specified to convert from wchar_t to utf8. PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Take a similar approach to node_file and allow the creation of paths code point must be specified to convert from wchar_t to utf8. PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Take a similar approach to node_file and allow the creation of paths code point must be specified to convert from wchar_t to utf8. PR-URL: nodejs#56696Fixes: nodejs#56650 Refs: nodejs#56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#56696Fixes: nodejs#56650 Refs: nodejs#56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Take a similar approach to node_file and allow the creation of paths code point must be specified to convert from wchar_t to utf8. PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#56696Fixes: nodejs#56650 Refs: nodejs#56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Take a similar approach to node_file and allow the creation of paths code point must be specified to convert from wchar_t to utf8. PR-URL: nodejs#56696Fixes: nodejs#56650 Refs: nodejs#56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Take a similar approach to node_file and allow the creation of paths code point must be specified to convert from wchar_t to utf8. PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Take a similar approach to node_file and allow the creation of paths code point must be specified to convert from wchar_t to utf8. PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Take a similar approach to node_file and allow the creation of paths code point must be specified to convert from wchar_t to utf8. PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: #56696Fixes: #56650 Refs: #56657 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Fix: #56650
This PR fixes a problem that caused a segmentation fault in module resolution when creating a require object with multibyte characters in a non-English environment.
Since the issue occurred when generating a std::filesystem::path object, some patches were applied to the changed areas in the following PR.
a7dad43
Caution
It cannot be reproduced by using
chcpcommand in a Windows environment, and it is necessary to change the locale in the OS settings...