mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Fix: Increase Stack size
Low stack size could result in a stack overflow exception if traversing
very highly nested directories.
This makes core-dumps less likely but will not completely remove the
risk
example for creating directories:
mkdir -p $(for i in {1..5000}; do echo -n "qwe/"; done)
original issue:
https://github.com/bootandy/dust/issues/197
This commit is contained in:
@@ -295,6 +295,11 @@ fn main() {
|
||||
by_filecount,
|
||||
ignore_hidden,
|
||||
};
|
||||
// Larger stack size to handle cases with lots of nested directories
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.stack_size(usize::pow(1024, 3))
|
||||
.build_global()
|
||||
.unwrap();
|
||||
|
||||
let (top_level_nodes, has_errors) = walk_it(simplified_dirs, walk_data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user