-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[Bug]: Stack overflow in CreateDirectoriesRecursively #4262
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the issue
Asking google test to output to a non existing path, on a system with no notion of "./" being a path causes FilePath::CreateDirectoriesRecursively to end up in an infinite loop with stack overflow.
Steps to reproduce the problem
Somewhat hard.
What version of GoogleTest are you using?
6092810
Its also patch in a small way to work around: #1372
What operating system and version are you using?
rt-kernel
What compiler and version are you using?
arm-eabi-gcc (rt-collab toolbox 2022.1-0-gf81ad3e) 10.4.0
What build system are you using?
cmake version 3.25.0
Additional context
When creating directories recursively the stop condition is an empty pathname:
googletest/googletest/src/gtest-filepath.cc
Line 338 in 04cf298
However, RemoveFileName() function will never end up with an empty pathname, but a ./ separator.
googletest/googletest/src/gtest-filepath.cc
Line 215 in 04cf298
The text was updated successfully, but these errors were encountered: