I tried this code:
std::fs::create_dir_all(big_path);
I expected to see this happen: doesn't stack overflow
Instead, this happened:
std::fs::create_dir_all with a big path with many uncreated directories will stack overflow on Windows. The max path is 32767, which can technically result in ~16383 recursive calls, which will stack overflow the 1mb default stack on Windows.
Meta
rustc --version --verbose:
rustc 1.77.1 (7cf61ebde 2024-03-27)
binary: rustc
commit-hash: 7cf61ebde7b22796c69757901dd346d0fe70bd97
commit-date: 2024-03-27
host: x86_64-pc-windows-msvc
release: 1.77.1
LLVM version: 17.0.6
I tried this code:
I expected to see this happen: doesn't stack overflow
Instead, this happened:
std::fs::create_dir_allwith a big path with many uncreated directories will stack overflow on Windows. The max path is 32767, which can technically result in ~16383 recursive calls, which will stack overflow the 1mb default stack on Windows.Meta
rustc --version --verbose: