Commit 773fd7a
fs: fix realpath inode link caching
The `fs.realpath` / `fs.realpathSync` cache already seen symbolic links
using the inode number which may be longer that max supported
JS number (2**53) and will therefore be incorrectly handled by possibly
entering infinite loop of calling stat on the same node.
This PR changes those functions (where appropriate) to use
bigint for inode numbers.
Fixes: #33936
PR-URL: #33945
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent 0f64a7a commit 773fd7a
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| |||
1614 | 1618 | | |
1615 | 1619 | | |
1616 | 1620 | | |
1617 | | - | |
| 1621 | + | |
1618 | 1622 | | |
1619 | 1623 | | |
1620 | 1624 | | |
| |||
1747 | 1751 | | |
1748 | 1752 | | |
1749 | 1753 | | |
1750 | | - | |
| 1754 | + | |
1751 | 1755 | | |
1752 | 1756 | | |
1753 | 1757 | | |
| |||
0 commit comments