-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix segfault in case of no write access to log dir #546
Conversation
If there is no permission to create the log directories, the FileLogger will call itself recutsive, as is used ignerr for logging the error, which will call FileLogger::Init again. This commit fixed this, by using std::cerr for the log output in FileLogger::Init. Signed-off-by: Janosch Machowinski <[email protected]>
Signed-off-by: Janosch Machowinski <[email protected]>
once merged, this will be forward ported across versions. |
Co-authored-by: Ian Chen <[email protected]> Signed-off-by: jmachowinski <[email protected]>
Co-authored-by: Ian Chen <[email protected]> Signed-off-by: jmachowinski <[email protected]>
ping ? |
@@ -41,7 +41,7 @@ IGN_ENUM(myTypeIface, MyType, MY_TYPE_BEGIN, MY_TYPE_END, | |||
///////////////////////////////////////////////// | |||
TEST_F(EnumIfaceTest, StringCoversion) | |||
{ | |||
MyType type; | |||
MyType type = MyType::TYPE2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change related to the rest of the pull request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is a separate commit fixing a compile warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small question, overall LGTM
🦟 Bug fix
Fixes a Segfault when building Ign common3 with pbuilder
Summary
If there is no write access to the log directory, the logger will call itself recusively in an infinite loop and segfault.
Note, this bug is also present in the latest version of ign common.