-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src: check IsConstructCall in TLSWrap constructor #13097
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodejs-github-bot
added
c++
Issues and PRs that require attention from people who are familiar with C++.
tls
Issues and PRs related to the tls subsystem.
labels
May 18, 2017
bnoordhuis
approved these changes
May 18, 2017
I'd maybe reword the commit log as "src: check IsConstructCall in TLSWrap constructor" - that still fits in 50 columns and is a bit more descriptive, IMO. |
Currently it is possible to call TLSWrap() without using new and the following error message: FATAL ERROR: v8::Object::SetAlignedPointerInInternalField() Internal field out of bounds 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::OnFatalError(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: v8::Utils::ReportApiFailure(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 4: v8::Utils::ApiCheck(bool, char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 5: v8::InternalFieldOK(v8::internal::Handle<v8::internal::JSReceiver>, int, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 6: v8::Object::SetAlignedPointerInInternalField(int, void*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 7: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] This commit adds a IsConstructCall check which will produce the following error message: /Users/danielbevenius/work/nodejs/node/out/Debug/node[2212]: ../src/tls_wrap.cc:936:auto node::TLSWrap::Initialize(Local<v8::Object>, Local<v8::Value>, Local<v8::Context>)::(anonymous class)::operator()(const FunctionCallbackInfo<v8::Value> &) const: Assertion `args.IsConstructCall()' failed. 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::Assert(char const* const (*) [4]) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node]
danbev
force-pushed
the
tls_wrap-add-is-construct-call
branch
from
May 18, 2017 10:25
e333f29
to
1ff414e
Compare
danbev
changed the title
src: add IsConstructCall TLSWrap constructor
src: check IsConstructCall in TLSWrap constructor
May 18, 2017
I agree, I've updated this now. |
addaleax
approved these changes
May 18, 2017
cjihrig
approved these changes
May 18, 2017
danbev
added a commit
to danbev/node
that referenced
this pull request
May 22, 2017
Currently it is possible to call TLSWrap() without using new and the following error message: FATAL ERROR: v8::Object::SetAlignedPointerInInternalField() Internal field out of bounds 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::OnFatalError(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: v8::Utils::ReportApiFailure(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 4: v8::Utils::ApiCheck(bool, char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 5: v8::InternalFieldOK(v8::internal::Handle<v8::internal::JSReceiver>, int, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 6: v8::Object::SetAlignedPointerInInternalField(int, void*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 7: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] This commit adds a IsConstructCall check which will produce the following error message: /Users/danielbevenius/work/nodejs/node/out/Debug/node[2212]: ../src/tls_wrap.cc:936:auto node::TLSWrap::Initialize(Local<v8::Object>, Local<v8::Value>, Local<v8::Context>)::(anonymous class)::operator()(const FunctionCallbackInfo<v8::Value> &) const: Assertion `args.IsConstructCall()' failed. 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::Assert(char const* const (*) [4]) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] PR-URL: nodejs#13097 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Landed in 57f38c6 |
jasnell
pushed a commit
that referenced
this pull request
May 23, 2017
Currently it is possible to call TLSWrap() without using new and the following error message: FATAL ERROR: v8::Object::SetAlignedPointerInInternalField() Internal field out of bounds 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::OnFatalError(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: v8::Utils::ReportApiFailure(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 4: v8::Utils::ApiCheck(bool, char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 5: v8::InternalFieldOK(v8::internal::Handle<v8::internal::JSReceiver>, int, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 6: v8::Object::SetAlignedPointerInInternalField(int, void*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 7: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] This commit adds a IsConstructCall check which will produce the following error message: /Users/danielbevenius/work/nodejs/node/out/Debug/node[2212]: ../src/tls_wrap.cc:936:auto node::TLSWrap::Initialize(Local<v8::Object>, Local<v8::Value>, Local<v8::Context>)::(anonymous class)::operator()(const FunctionCallbackInfo<v8::Value> &) const: Assertion `args.IsConstructCall()' failed. 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::Assert(char const* const (*) [4]) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] PR-URL: #13097 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
jasnell
pushed a commit
that referenced
this pull request
May 23, 2017
Currently it is possible to call TLSWrap() without using new and the following error message: FATAL ERROR: v8::Object::SetAlignedPointerInInternalField() Internal field out of bounds 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::OnFatalError(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: v8::Utils::ReportApiFailure(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 4: v8::Utils::ApiCheck(bool, char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 5: v8::InternalFieldOK(v8::internal::Handle<v8::internal::JSReceiver>, int, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 6: v8::Object::SetAlignedPointerInInternalField(int, void*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 7: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] This commit adds a IsConstructCall check which will produce the following error message: /Users/danielbevenius/work/nodejs/node/out/Debug/node[2212]: ../src/tls_wrap.cc:936:auto node::TLSWrap::Initialize(Local<v8::Object>, Local<v8::Value>, Local<v8::Context>)::(anonymous class)::operator()(const FunctionCallbackInfo<v8::Value> &) const: Assertion `args.IsConstructCall()' failed. 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::Assert(char const* const (*) [4]) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] PR-URL: #13097 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
3 tasks
MylesBorins
pushed a commit
that referenced
this pull request
Jul 17, 2017
Currently it is possible to call TLSWrap() without using new and the following error message: FATAL ERROR: v8::Object::SetAlignedPointerInInternalField() Internal field out of bounds 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::OnFatalError(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: v8::Utils::ReportApiFailure(char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 4: v8::Utils::ApiCheck(bool, char const*, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 5: v8::InternalFieldOK(v8::internal::Handle<v8::internal::JSReceiver>, int, char const*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 6: v8::Object::SetAlignedPointerInInternalField(int, void*) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 7: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] This commit adds a IsConstructCall check which will produce the following error message: /Users/danielbevenius/work/nodejs/node/out/Debug/node[2212]: ../src/tls_wrap.cc:936:auto node::TLSWrap::Initialize(Local<v8::Object>, Local<v8::Value>, Local<v8::Context>)::(anonymous class)::operator()(const FunctionCallbackInfo<v8::Value> &) const: Assertion `args.IsConstructCall()' failed. 1: node::Abort() [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 2: node::Assert(char const* const (*) [4]) [/Users/danielbevenius/work/nodejs/node/out/Debug/node] 3: node::TLSWrap::Initialize(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)::$_0::operator()(v8::FunctionCallbackInfo<v8::Value> const&) const [/Users/danielbevenius/work/nodejs/node/out/Debug/node] PR-URL: #13097 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently it is possible to call TLSWrap() without using new and the
following error message:
This commit adds a IsConstructCall check which will produce the
following error message:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
src, crypto