-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Guard check that event_base_new initializes correctly #12218
Conversation
Signed-off-by: davinci26 <sotirisnan@gmail.com>
cc the usual windows crew @wrowe @sunjayBhatia @nigriMSFT |
Signed-off-by: davinci26 <sotirisnan@gmail.com>
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.
looks fine; just a style nit
Signed-off-by: davinci26 <sotirisnan@gmail.com>
@@ -15,7 +15,11 @@ void recordTimeval(Stats::Histogram& histogram, const timeval& tv) { | |||
} | |||
} // namespace | |||
|
|||
LibeventScheduler::LibeventScheduler() : libevent_(event_base_new()) { | |||
LibeventScheduler::LibeventScheduler() { | |||
event_base* eventBase = event_base_new(); |
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.
I believe @jmarantz was requesting the variable eventBase
be snake cased to event_base
(#12218 (comment))
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.
thanks totally missed this one
Signed-off-by: davinci26 <sotirisnan@gmail.com>
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.
Thanks!
Signed-off-by: davinci26 <sotirisnan@gmail.com>
Signed-off-by: davinci26 <sotirisnan@gmail.com> Signed-off-by: chaoqinli <chaoqinli@google.com>
Signed-off-by: Sotiris Nanopoulos sonanopo@microsoft.com
Add a release assert to the libevent
event_base_new()
to make sure that the initialization is correct and make envoy fail fast if it fails.Additional Description:
This scenario crashes with an Access Violation at later stages. With this change we just make sure that we crash closer to where we actually failed.
Risk Level: low
Testing: N/A
Docs Changes: N/A
Release Notes: N/A