Skip to content

Guard check that event_base_new initializes correctly#12218

Merged
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
davinci26:libeventInit
Jul 30, 2020
Merged

Guard check that event_base_new initializes correctly#12218
mattklein123 merged 5 commits intoenvoyproxy:masterfrom
davinci26:libeventInit

Conversation

@davinci26
Copy link
Copy Markdown
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
Copy Markdown
Member Author

cc the usual windows crew @wrowe @sunjayBhatia @nigriMSFT

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

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

LibeventScheduler::LibeventScheduler() : libevent_(event_base_new()) {
LibeventScheduler::LibeventScheduler() {
event_base* eventBase = event_base_new();
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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