Skip to content
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

Merged
merged 5 commits into from
Jul 30, 2020

Conversation

davinci26
Copy link
Member

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

Signed-off-by: davinci26 <sotirisnan@gmail.com>
@davinci26
Copy link
Member Author

cc the usual windows crew @wrowe @sunjayBhatia @nigriMSFT

Signed-off-by: davinci26 <sotirisnan@gmail.com>
Copy link
Contributor

@jmarantz jmarantz left a 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

source/common/event/libevent_scheduler.cc Outdated Show resolved Hide resolved
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();
Copy link
Member

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))

Copy link
Member Author

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>
Signed-off-by: davinci26 <sotirisnan@gmail.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit fc7885c into envoyproxy:master Jul 30, 2020
chaoqin-li1123 pushed a commit to chaoqin-li1123/envoy that referenced this pull request Aug 7, 2020
Signed-off-by: davinci26 <sotirisnan@gmail.com>
chaoqin-li1123 pushed a commit to chaoqin-li1123/envoy that referenced this pull request Aug 7, 2020
Signed-off-by: davinci26 <sotirisnan@gmail.com>
Signed-off-by: chaoqinli <chaoqinli@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants