Open
Description
Version
22.14.0
Platform
Linux p14s 6.11.0-26-generic #26~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 17 19:20:47 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
- Create the following paths:
- with umlaut:
/tmp/söme-päth
- without umlaut:
/tmp/some-path
- with umlaut:
- Run the following snippet, passing option
--expose-internals
to node:
const {internalBinding} = require('internal/test/binding');
const internalFsBinding = internalBinding('fs');
let path = '/tmp/söme-päth';
// path = '/tmp/some-path';
for (let i = 0; i < 10000; i++) {
const result = internalFsBinding.internalModuleStat(internalFsBinding, path);
console.log(result);
}
How often does it reproduce? Is there a required condition?
Running the snippet, consistently 6265 (+- 5) times 1
is printed (as expected), the remaining time -1
is printed.
What is the expected behavior? Why is that the expected behavior?
As the path exists, the method should consistently return 1.
What do you see instead?
The method internalModuleStat
sometimes detects the path, sometimes not.
Additional information
The method internalModuleStat
works nicely for paths without umlauts. Also, it seems that debuggin / and or adding additional code changes the results.
Metadata
Metadata
Assignees
Labels
No labels