-
Notifications
You must be signed in to change notification settings - Fork 29.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
tls_wrap: clear errors on return #4515
Conversation
I'm not sure how the test case should look like, but this PR fixes #4485 on v0.12 branch. |
@@ -401,6 +400,9 @@ void TLSWrap::ClearOut() { | |||
if (ssl_ == nullptr) | |||
return; | |||
|
|||
crypto::ClearErrorOnReturn clear_error_on_return; | |||
(void) &clear_error_on_return; // Silence compiler warning. |
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 think you can drop this line now. IIRC, that was a workaround for a false positive in gcc 4.2 or 4.4.
LGTM with a suggestion. Maybe it's better to use |
Adopt `MarkPopErrorOnReturn` from `node_crypto.cc`, and use it to clear errors after `SSL_read`/`SSL_write`/`SSL_shutdown` functions. See: nodejs#4485 PR-URL: nodejs#4515 Reviewed-By: Ben Noordhuis <[email protected]>
c3add8b
to
9e1d151
Compare
Thank you, force pushed. CI: https://ci.nodejs.org/job/node-test-pull-request/1141/ |
Failures seems to be unrelated, but just in case: https://ci.nodejs.org/job/node-test-pull-request/1142/ |
LGTM |
Landed in 4f87574, thank you! |
Adopt `MarkPopErrorOnReturn` from `node_crypto.cc`, and use it to clear errors after `SSL_read`/`SSL_write`/`SSL_shutdown` functions. See: #4485 PR-URL: #4515 Reviewed-By: Ben Noordhuis <[email protected]>
Adopt `MarkPopErrorOnReturn` from `node_crypto.cc`, and use it to clear errors after `SSL_read`/`SSL_write`/`SSL_shutdown` functions. See: nodejs#4485 PR-URL: nodejs#4515 Reviewed-By: Ben Noordhuis <[email protected]>
@thealphanerd Argh, is it because of the |
I didn't dig in too deep, but usually those kind of conflicts are due to missing patch's. |
@thealphanerd this patch should do it: https://gist.github.com/indutny/41e1992a45b1cb0b062e |
making sure we are on the same is the above patch a replacement for this commit or something to put in first? If you don't mind would you be willing to wrap that all up in a single PR and submit against v4.x-staging? |
Adopt `MarkPopErrorOnReturn` from `node_crypto.cc`, and use it to clear errors after `SSL_read`/`SSL_write`/`SSL_shutdown` functions. See: nodejs#4485 PR-URL: nodejs#4515 Reviewed-By: Ben Noordhuis <[email protected]>
@thealphanerd it is just a resolved conflicts. See #4687 |
Adopt `MarkPopErrorOnReturn` from `node_crypto.cc`, and use it to clear errors after `SSL_read`/`SSL_write`/`SSL_shutdown` functions. See: #4485 PR-URL: #4515 Reviewed-By: Ben Noordhuis <[email protected]> v4.x-staging Commit Metadata: PR-URL: #4709 Reviewed-By: James M Snell <[email protected]>
Adopt `MarkPopErrorOnReturn` from `node_crypto.cc`, and use it to clear errors after `SSL_read`/`SSL_write`/`SSL_shutdown` functions. See: #4485 PR-URL: #4515 Reviewed-By: Ben Noordhuis <[email protected]> v4.x-staging Commit Metadata: PR-URL: #4709 Reviewed-By: James M Snell <[email protected]>
Adopt `MarkPopErrorOnReturn` from `node_crypto.cc`, and use it to clear errors after `SSL_read`/`SSL_write`/`SSL_shutdown` functions. See: nodejs#4485 PR-URL: nodejs#4515 Reviewed-By: Ben Noordhuis <[email protected]>
Adopt
ClearErrorOnReturn
fromnode_crypto.cc
, and use it to clearerrors after
SSL_read
/SSL_write
/SSL_shutdown
functions.See: #4485