-
Notifications
You must be signed in to change notification settings - Fork 379
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 ACE_Logging_Strategy::handle_timeout
returning -1
without releasing ACE_Log_Msg
lock
#2259
base: master
Are you sure you want to change the base?
Conversation
ACE_Logging_Strategy::handle_timeou
t returning -1
without releasing ACE_Log_Msg
lockACE_Logging_Strategy::handle_timeout
returning -1
without releasing ACE_Log_Msg
lock
…ng ACE_Log_Msg lock
5324f14
to
9dd8a78
Compare
Don’t force push, makes it harder to review, use nullptr instead of 0 |
OK. Shall I combine two commits into one after reviewed so that keep one issue per commit? |
No need to squash, please add/extend a unit test as reproducer |
WalkthroughThe changes in the Changes
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (19)
🔇 Additional comments (4)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
ACE/ace/Logging_Strategy.cpp (1)
445-449
: Consider checking the return code fromACE_OS::fclose
.
By silently ignoring potential errors, you may miss critical flush or close failures. For example, you could log an error or return a failure status:-ACE_OS::fclose (output_file); +if (ACE_OS::fclose (output_file) != 0) + { + ACELIB_ERROR ((LM_ERROR, ACE_TEXT ("Failed to close output file\n"))); + return -1; + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
ACE/ace/Logging_Strategy.cpp
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
ACE/ace/Logging_Strategy.cpp (1)
436-437
: Good use ofACE_Guard
to ensure lock release.
This approach prevents the function from returning prematurely without unlocking, reducing the risk of deadlocks.
* ACE/ace/Logging_Strategy.cpp:
* ACE/ace/Logging_Strategy.cpp:
* ACE/ace/Logging_Strategy.cpp: * ACE/ace/Logging_Strategy.h:
Before changed, there were two snippets in
ACE_Logging_Strategy::handle_timeout
:whiich would return without releasing
ACE_Log_Msg
lockSummary by CodeRabbit