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

Fix BearSSL Server WDT #5702

Merged
merged 1 commit into from
Feb 1, 2019
Merged

Conversation

earlephilhower
Copy link
Collaborator

Fixes #5701 WDTs and other issues with BearSSL::WiFiServerSecure

The BSSL server was creating the client it returns on a connection in a
way that caused the counter for the stack_thunk to get out of sync and
cause it to be freed improperly by having the destructor be called on
more time than the constructor. Looks like RVO.

Rewrite the ::available() function in order to avoid this issue with
help from @devyte.

Fixes esp8266#5701 WDTs and other issues with BearSSL::WiFiServerSecure

The BSSL server was creating the client it returns on a connection in a
way that caused the counter for the stack_thunk to get out of sync and
cause it to be freed improperly by having the destructor be called on
more time than the constructor.  Looks like RVO.

Rewrite the ::available() function in order to avoid this issue with
help from @devyte.
@earlephilhower earlephilhower added this to the 2.5.0 milestone Feb 1, 2019
Copy link
Collaborator

@devyte devyte left a comment

Choose a reason for hiding this comment

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

Nvm, assignment can't be avoided for RVO.
Approving.

@earlephilhower earlephilhower merged commit 3f8cd46 into esp8266:master Feb 1, 2019
@earlephilhower earlephilhower deleted the bsslserverfix branch February 1, 2019 06:47
@kaeptnlinux
Copy link

For me the fixes also worked fine. Thanks a lot

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.

3 participants