-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix hard-fault when socket created using accept() is closed #8336
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
Conversation
When socket created using accept() is closed by calling the close() method, "delete this" is executed which triggers the destructor call on TCPSocket which in turn calls close() once again. Because _stack is already 0 this results in a hard-fault. Add a check that skips the rest of the close() method is the _stack is already 0.
2d55027
to
9b89ad2
Compare
/morph export-build |
/morph build |
1 similar comment
/morph build |
Build : SUCCESSBuild number : 3333 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 2965 |
Test : SUCCESSBuild number : 3141 |
/morph mbed2-build |
/morph export-build |
Exporter Build : SUCCESSBuild number : 2976 |
Description
When socket created using accept() is closed by calling the close()
method, "delete this" is executed which triggers the destructor call
on TCPSocket which in turn calls close() once again. Because _stack
is already 0 this results in a hard-fault.
Add a check that skips the rest of the close() method if the _stack
is already 0.
Tested on NUCLEO-F767ZI. Applies both to master and to release-candidate branches.
Pull request type