-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: reach error reporting for UV_EPROTO #4885
Conversation
Do not swallow error details when reporting UV_EPROTO asynchronously, and when creating artificial errors. Fix: nodejs#3692
LGTM |
static char msg[] = "Write after DestroySSL"; | ||
char* tmp = new char[sizeof(msg)]; | ||
memcpy(tmp, msg, sizeof(msg)); | ||
error_ = tmp; |
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'd add a CHECK_EQ(error_, nullptr)
, otherwise it's a memory leak waiting to happen.
EDIT: Or call ClearError()
first.
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.
Ack.
@bnoordhuis replied and fixed. |
LGTM |
@bnoordhuis PTAL ;) |
LGTM |
Landed in ff4006c, thank you everyone! |
Do not swallow error details when reporting UV_EPROTO asynchronously, and when creating artificial errors. Fix: nodejs#3692 PR-URL: nodejs#4885 Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Do not swallow error details when reporting UV_EPROTO asynchronously,
and when creating artificial errors.
Fix: #3692
R = @bnoordhuis or @shigeki
cc @nodejs/crypto