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

[8.0.0] v8.Serializer crashes on bad input #13326

Closed
gireeshpunathil opened this issue May 31, 2017 · 4 comments
Closed

[8.0.0] v8.Serializer crashes on bad input #13326

gireeshpunathil opened this issue May 31, 2017 · 4 comments
Assignees
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@gireeshpunathil
Copy link
Member

  • Version: v8.0.0
  • Platform: mac, Darwin xnu-3248.30.4~1/RELEASE_X86_64 x86_64
  • Subsystem: v8
#node -e "require('v8').Serializer()"
/usr/local/bin/node[52273]: ../src/base-object-inl.h:80:void node::BaseObject::MakeWeak(Type *) [Type = node::(anonymous namespace)::SerializerContext]: Assertion `(handle->InternalFieldCount()) > (0)' failed.
 1: node::Abort() [/usr/local/bin/node]
 2: node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, char const*, int, v8::Local<v8::Value>*, double, double) [/usr/local/bin/node]
 3: node::(anonymous namespace)::SerializerContext::New(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/bin/node]
 5: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 6: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 7: 0x1b2d558437d
Abort trap: 6

Expectation is to handle this in JS code itself.

@addaleax addaleax self-assigned this May 31, 2017
@addaleax
Copy link
Member

Thanks – this isn’t really bad input to the serializer, it’s the Serializer class requiring to be called with new. I can fix this later today or tomorrow, unless somebody else wants to.

@gireeshpunathil
Copy link
Member Author

thanks @addaleax !

@mscdex mscdex added v8 engine Issues and PRs related to the V8 dependency. v8.x labels May 31, 2017
zimbabao added a commit to zimbabao/node that referenced this issue Jun 8, 2017
Calling Serializer/Deserlizer without new crashes node.
Adding a js class which just inherits cpp bindings.

Fixes: nodejs#13326
@zimbabao
Copy link
Contributor

zimbabao commented Jun 8, 2017

@addaleax : I tried to fix it, let me know if that not a proper fix.

@addaleax
Copy link
Member

addaleax commented Jun 8, 2017

Sorry, kind of forgot about this one. Thank you!

zimbabao added a commit to zimbabao/node that referenced this issue Jun 8, 2017
Calling Serializer/Deserlizer without new crashes node.
Adding a js class which just inherits cpp bindings.

Fixes: nodejs#13326
zimbabao added a commit to zimbabao/node that referenced this issue Jun 8, 2017
Calling Serializer/Deserlizer without new crashes node.
Adding a js class which just inherits cpp bindings.
Added refression tests.

Fixes: nodejs#13326
zimbabao added a commit to zimbabao/node that referenced this issue Jun 8, 2017
Calling Serializer/Deserializer without new crashes node.
Adding a js class which just inherits cpp bindings.
Added regression tests.

Fixes: nodejs#13326
zimbabao added a commit to zimbabao/node that referenced this issue Jun 9, 2017
Calling Serializer/Deserializer without new crashes node.
Adding a js class which just inherits cpp bindings.
Added regression tests.

Fixes: nodejs#13326
zimbabao added a commit to zimbabao/node that referenced this issue Jun 10, 2017
Calling Serializer/Deserializer without new crashes node.
Adding a js class which just inherits cpp bindings.
Added regression tests.

Fixes: nodejs#13326
addaleax pushed a commit that referenced this issue Jun 12, 2017
Calling Serializer/Deserializer without new crashes node.
Adding a js class which just inherits cpp bindings.
Added regression tests.

Fixes: #13326
PR-URL: #13541
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
ExE-Boss added a commit to ExE-Boss/node that referenced this issue Dec 17, 2020
addaleax pushed a commit that referenced this issue Dec 22, 2020
Fixes: #13326
Refs: #13541
PR-URL: #36549
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
danielleadams pushed a commit that referenced this issue Jan 12, 2021
Fixes: #13326
Refs: #13541
PR-URL: #36549
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
targos pushed a commit that referenced this issue May 1, 2021
Fixes: #13326
Refs: #13541
PR-URL: #36549
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
4 participants